Maverick Posted May 13, 2005 Share Posted May 13, 2005 Not sure what I am doing wrong or if this is an issue or not but I have written a script function to activate an Internt Explorer window and page and move a control on it. The function works fine with several values parameterized but only when I have the window title and control name explicitly defined in the calling AutoIt script. I tried making this script more functional so that it could be called by a command line but when passing in the same parameters that I had defined explicitly in the original script the window name is not recognized eventhough the AutoIt Window Info and other tools recognize it by that name?!? Below is the command I am using to execute the script and blow that is the window recognistion protion of the script that always seems to return a "Not Found" message box for the WinExists function: Command: Execute_M_Function01.au3 "Product L - Microsoft Internet Explorer", "MacromediaFlashPlayerActiveX1", 7, 10 Script to recognize existing window: ; Script Start - Add your code below here $window = $CmdLine[1] $control = $CmdLine[2] $point = $CmdLine[3] $fast = $CmdLine[4] If WinExists ($window) = 1 Then WinActivate($window) Else MsgBox(16, "Not Found", "Window: " & $window & " was not found.") EndIf Exit Any help or direction would be GREATLY appreciated. Link to comment Share on other sites More sharing options...
w0uter Posted May 13, 2005 Share Posted May 13, 2005 if your gonna use it in .au3 form the $cmdLine[1] is the script name. this would mean that $cmdLine[2] would be your $window My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Ejoc Posted May 13, 2005 Share Posted May 13, 2005 remove the commas: , Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs Link to comment Share on other sites More sharing options...
Maverick Posted May 13, 2005 Author Share Posted May 13, 2005 remove the commas: ,<{POST_SNAPBACK}>AAAARGRGGHHH!!!!Something so freaking STUPID!!!! (Hey it was my first script attempt though!)Once I removed the commas it worked fine.[should have posted this hours ago!]Thanks. 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