Maverick 0 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. Share this post Link to post Share on other sites
w0uter 4 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 Share this post Link to post Share on other sites
Ejoc 1 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 Share this post Link to post Share on other sites
Maverick 0 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. Share this post Link to post Share on other sites