Jump to content

Can't get Explorer Window recognized from $CmdLine


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...