possy_99 Posted July 28, 2009 Share Posted July 28, 2009 (edited) after some quick help, i'm looking to run an au3 file from a webhost. I would like it so that when a button is pressed in a (compiled exe) GUI, it runs the script. The processes contained in the au3 could differ which is why I want to have it in a way I can edit the sequence without having to replace compiled exe's. this is what I've tried.. and failed... (note the hashed lines in the func) case $button global $webcodeurl = "http://www.webhost.com/au3file.au3" runonlinecode() Func runonlinecode() If Not FileExists(@TempDir&"\AutoIt3.exe") Then FileInstall("AutoIt3.exe", @TempDir&"\AutoIt3.exe", 1) EndIf ;ShellExecute(@TempDir&'\AutoIt3.exe', ' /in '&$webcodeurl) ;$file_exe = FileGetShortName(@TempDir&'\AutoIt3.exe' & ' /AutoIt3ExecuteScript "' & $webcodeurl & '"') ;Run($file_exe) ;Run(@ComSpec & " /c " & '' & @TempDir&'\autoit3.exe '&$webcodeurl, "", @SW_HIDE) ;ShellExecute(@TempDir&"\AutoIt3.exe", $webcodeurl,) ;Run(@TempDir&"\AutoIt3.exe "&$webcodeurl) EndFunc when I double click the autoit3.exe it opens with a file open dialogue, I can copy/paste url in there and it works fine, I suppose I could also do it via copying the au3 to temp dir, but this way seems cleaner.. so rather than autoit3.exe c:\script.au3 I'd like autoit3.exe http://www.webhost.com/au3file.au3 ..any help appreciated >_< Edited July 28, 2009 by possy_99 Link to comment Share on other sites More sharing options...
Valuater Posted July 28, 2009 Share Posted July 28, 2009 Maybe... Global $file_loc = @ScriptDir & "\Test.au3" Case $button InetGet( "http://www.webhost.com/au3file.au3", $file_loc) ; Downloads a file from the internet using the http or ftp protocol. runonlinecode() ;... later Func runonlinecode() If @Compiled = 1 Then $file_exe = @AutoItExe & ' /AutoIt3ExecuteScript "' & $file_loc & '"' Run($file_exe) Else $file_au3 = FileGetShortName($file_loc) Run(@AutoItExe & " " & $file_au3, "", @SW_HIDE) EndIf EndFunc ;==>runonlinecode 8) Link to comment Share on other sites More sharing options...
Valuater Posted July 28, 2009 Share Posted July 28, 2009 If you get your system to work, I would sure like to know 8) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now