ISN AutoIT Studio - creating new form

ISN AutoIT Studio - creating new form



I created .isf form file in ISN studio. In my main.au3 file I have included this form (#include "Formsmain.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 :)





"-1" denotes the last GUI control that has been created in the script.
– mrt
Jan 31 '14 at 8:32




2 Answers
2



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.


.au3


#include "C:pathmyfunctions.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





See if there is an export or a way to save as au3. Typically you want to use one script for the GUI. then you can use other UDFs as additional code if you need it. you can also put the functions in the same script. So yes it can be all one big file
– Panama Jack
Jan 31 '14 at 14:08



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).


.isf


GuiSetState(@SW_SHOW, $HANDLE_OF_YOUR_GUI)



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



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ