Question

I created .isf form file in ISN studio. In my main.au3 file I have included this form (#include "Forms\main.isf"). But when i hit run nothing happens. Do I have to add somenthing in my main.au3? (I'm pretty new with AutoIT)

Also when I look into code which form generates there is:

$btn1 = GUICtrlCreateButton("Button",170,70,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"onBtn1Click")

shloudn't be there $btn1 instead of -1 in the second line?

Thanks :)

Was it helpful?

Solution

You need to make it a user defined function (UDF). That won't work because a UDF needs to be a .au3 file. I'm not familiar with ISN studio, however to include a UDF you need to do this.

#include "C:\path\myfunctions.au3"

Also if the UDF is in the same location as the script you can just use the relative path like this.

#include "myfunctions.au3"

Here is are some example UDF's.

http://www.autoitscript.com/wiki/User_Defined_Functions

OTHER TIPS

You have done nothing wrong; just forgot something.

It's correct to include the .isf file in your script. So the GUI is already present, just hidden! You only need to show it using: GuiSetState(@SW_SHOW, $HANDLE_OF_YOUR_GUI).

Then you should see your GUI! As an example see the "Testproject" in ISN AutoIt Studio.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top