8 posts in this topic
When I compile script and use it out of the map where
the source code is. So just moving main.exe to
other map, then source code is.
It breaks with error:
Error: Subscript used on non-accessible variable
So I wonder what kind of file do I need to
include with .exe file? Or should I do something else?
Because people that are using needs only .exe file
just start it and use it, with out source code.
How do i add a path to a file in Include.
I want my script to get the udf in the same folder as the script/exe:
Include "@ScriptDir/udf.au3" can this be done?
Excuse me, I did not understand how in the function of Main I can include hundreds of functions of my executable code ?? How to implement this?
I have a script that gets a list of visible windows and makes a tray item of each in the tray menu. I'd also want it to update every time I want to access that menu again, in case new windows have appeared or some would have been closed. I'm using TrayOnEventMode option and trying to get the update going with TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN...) as in the snippet below. However, the list doesn't update until after the tray menu has been closed again. I think I could work around this by having the script update the list constantly in the background, but that feels like it'd take up unnecessary amount of resources since the script might be used rarely by the user anyway. I tried using TraySetOnEvent($TRAY_EVENT_MOUSEOVER...), and that kind of does it, but it actually still calls my function many times (since the mouse cursor moves quite a bit on the icon) before the tray menu is opened. I could put another menuitem to call the update function, but I'd much rather have just the minimal amount of user actions. Similarly I could have tray menu open with a double click (with TraySetClick()) and have the first click just call the update function, but can anyone tell me if there's a way to call the update once and then have the menu open without these gimmicks?
Opt("TrayOnEventMode", 1) TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, "UpdateWindowsList")
I have recorded a gui installation and modified the au3 file as per my requirement.
But the problem is, whenever I try to compile the au3 file, I am getting a special character on top of the file.
Can you suggest how to resolve this as it is appearing everytime during compilation.
And also I am trying to include a au3 file which is separate folder so I am adding the <..\Library.au3> line.
It is able to pick that but in that file "Library.au3" there is a file install line.
FileInstall(".\SendMail.ps1", @ScriptDir & "\SendMail.ps1") Library.au3 is being used by many other codes in the previous folder..
But the current file is looking for the ps1 file in current folder.
So is there any option to tell the compiler to pick the dependent files relative to Library.au3 instead of the current code.