Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"HELP!!!!" is not descriptive :-)

Status
Not open for further replies.

aLittleBoy

Programmer
Sep 17, 2002
6
CA
(vb)
is there a way to call api's in vbs?

(i'm sorry if this is a dunb question, I only programmed for a year)
 

Yes, the easiest way to use API's is to use the API viewer. You will find this under Addins. If you do not see it click on the Addin Manager. A dialog box will come up and you should see VB6 API Viewer. Click on it and on the bottom right you will see a load behavior section. Click on Loaded/Unloaded (so the checkbox is checked) and this will load it for you when you click on OK.

Go back to the Addins menu and select the API viewer. A non modal form will appear. Click on file, click on load text file. You should see 2 or 3 text files in the common dialog. Select Win32api.txt. This file has most all of the API's that you will need to use.

Good Luck
 
I think you mean VBScript. No. Due to the strict data types in API calls and the absence of data types in VBScript, you will never be able to call an API routine from VBScript.

However, if you have regular visual basic, you could make an activex dll that uses the API functions, register it on the machine where the VBScript program runs and use the createObject function to call functions in your DLL.

Best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top