Darin Posted January 22, 2011 Share Posted January 22, 2011 I was wondering if there was any way to execute the builtin functions from a variable using Call or some other command I missed? OR, Is there is a way to run a .au3 from inside a compiled script? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 22, 2011 Share Posted January 22, 2011 Hi and Welcome to the forums!execute the builtin functions from a variable using Call or some other command I missed?Call() is Call(), just use it if that is what you want. Experience says you doesn't want it though.OR, Is there is a way to run a .au3 from inside a compiled script?Define "inside".When asking for help it is generally advisable to post a reproducer (short working example) so we have a chance of knowing what you're actually doing. Your description is kinda lacking details too. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Darin Posted January 22, 2011 Author Share Posted January 22, 2011 Inside: Say I have a compiled script to do most of the support stuff for the install but I need to define a few particulars externally from an ini file. [v1.2] Commands=ProgramV1.2.au3 [v1.3] Commands=ProgramV1.4.au3 ProgramV1.2.au3 WinWaitActive("Program Installer") WinActivate ( "Program Installer" ) ControlClick ( "Program Installer", "", 1108 ) ControlClick ( "Program Installer", "", 1111 ) ControlClick ( "Program Installer", "", 1114 ) ControlClick ( "Program Installer", "", 1117 ) ProgramV1.4.au3 WinWaitActive("Program Installer") WinActivate ( "Program Installer" ) ControlClick ( "Program Installer", "", 520 ) ControlClick ( "Program Installer", "", 520 ) ControlClick ( "Program Installer", "", 524 ) ControlClick ( "Program Installer", "", 527 ) and be able to execute those lines from a call or something ( #include won't do here) inside the compiled script. (same reason I was asking about calling the functions from a variable and why would I not want to do it that way? ) Link to comment Share on other sites More sharing options...
Darin Posted January 22, 2011 Author Share Posted January 22, 2011 (edited) Ok, even though the example (the one in the function reference) didn't help I tried the execute function. That did what I needed. Effectively I can read in an .au3 and "execute" each line. Thanks for the reponse AdmiralAlkex. Edited January 22, 2011 by Darin Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 22, 2011 Share Posted January 22, 2011 Using Call() without a reason is pointless to start with, and later it could end up confusing and in tears. Using Call() is going to end up confusing and in tears if you're not careful, so you shouldn't use that without a reason. Like here. Either use functions (see "Func...Return...EndFunc" in helpfile") and then Call() them. Example: Change Ini to: [v1.3] Commands=_ProgramV14 And run: $sRet = IniRead(@SomeFolder & "\SomeIni", "v1.3", "Commands", "SomeDefault") If $sRet = "SomeDefault" Exit Call($sRet) Func _ProgramV14() WinWaitActive("Program Installer") WinActivate ( "Program Installer" ) ControlClick ( "Program Installer", "", 520 ) ControlClick ( "Program Installer", "", 520 ) ControlClick ( "Program Installer", "", 524 ) ControlClick ( "Program Installer", "", 527 ) EndFunc Or if you want them external compile to a3x, and then run that. See "Running Scripts" in helpfile. And you weren't born 1987 were you? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 22, 2011 Share Posted January 22, 2011 Ok, even though the example didn't help I tried the execute function. That did what I needed. Effectively I can read in an .au3 and "execute" each line. Thanks for the reponse AdmiralAlkex.Ehhh right.... .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Darin Posted January 22, 2011 Author Share Posted January 22, 2011 I'll have to give your example a try. Thanks. (The example I referenced was the execute function in the help guide) and No, I wasn't born in 1987. I'm old enough to have watched StarWars in the movie theatre in 1977 and already retired from my first career. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 22, 2011 Share Posted January 22, 2011 Well then you're not really Darin then. Good. That guy sucks. I'm gonna call you D. Wassup D? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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