Jump to content
Sign in to follow this  

Send Variable String to Command Prompt

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
    While 1
        $WindowTitle = WinGetTitle("","")
            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")
ShellExecute('"C:\Documents and Settings\' & @UserName & '\Start Menu\Programs\Accessories\Command Prompt"')

Share this post

Link to post
Share on other sites


LOL... Somehow I thought it might be that simple. Thanks a ton Manadar.

Share this post

Link to post
Share on other sites

To anyone who happens to come across this, I found a better way to do what I was doing, which is essentially debugging:

;MsgBox ( 1, "Title", VariablName)

Share this post

Link to post
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

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.