Jump to content

Send Variable String to Command Prompt


Webs
 Share

Recommended Posts

So below is a section of my script I'm having problems with. I was wondering if someone knew how to send a string variable to a command prompt. I think I know how to open a command prompt, but wanted to send a variable to said prompt for debugging purposes. The variable I am trying to pull the string from is "$WindowTitle".

Any help would be greatly appreciated.

#include <IE.au3>

;Open IE, go to Foundstone webpage with the following parameters: 0=opens webpage, 1=visible, 1=_ieloadwait
$oIE = _IECreate("https://fdxfse2.jdnet.deere.com/",0,1,1)

;Accept Certificate from Windows Security popup
;Func
    Sleep(3000)
    While 1
        $WindowTitle = WinGetTitle("","")
        Select
            Case $WindowTitle = "Security Alert"
                WinActivate("Security Alert","")
                ControlClick("Security Alert","","Button1")
            Case $WindowTitle = "Choose a digital certificate"
                WinActivate("Choose a digital certificate","")
                ControlClick("Choose a digital certificate","","Button3")
            Case $WindowTitle = "Certificate Error: Navigation Blocked"
                WinActivate("Certificate Error: Navigation Blocked","")
                _IEImgClick ($oIE, "red_shield.png", "src")
            ExitLoop
        EndSelect
    WEnd
;EndFunc
ShellExecute('"C:\Documents and Settings\' & @UserName & '\Start Menu\Programs\Accessories\Command Prompt"')
Link to comment
Share on other sites

if you work with Scite, you could easy use the CTRL+SHIFT+D or ALT+d or explore the other "debug"-tools in the "Extras"-menu

a nice  abbreviation is to type mb2 in scite and after that the space-key. there are much more abbreviations listed in the abbrev.properties in the "Options"-menu

Edited by AndyG
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...