UEZ Posted April 17, 2011 Share Posted April 17, 2011 To open a RDP session directly from commandline you have to use the /v parameter! E.g.: mstsc /v:190.190.190.190 In your example somthing like that: $result = Run(@SystemDir & "\mstsc.exe /v:" & $sLine) I assume $sLine contains the ip or hostname where you want establish a connection. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
CH0VI3 Posted April 18, 2011 Author Share Posted April 18, 2011 @ UEZ, Once again thank you for your efforts on this project of mine. Thank You ...... Thank You ........ Thank You Works perfectly, I have got a few other idea's that I am going to try. Kind Regards CH0VI3 Link to comment Share on other sites More sharing options...
CH0VI3 Posted April 18, 2011 Author Share Posted April 18, 2011 Hi all, I have run into another problem; How do I get the information "IP Add."tiped in here $IPAddress2 = _GUICtrlIpAddress_Create($CCTV, 0, 240, 130, 25) _GUICtrlIpAddress_Set($IPAddress2, "0.0.0.0") to be used in a telnet session here Case $PINGB1 $s_ip = _GUICtrlIpAddress_Get($IPAddress2) If Ping($s_ip) > 0 Then Run("[u]C:\WINDOWS\system32\telnet.exe[/u]") Else MsgBox(0, "Telnet", "No Reply") EndIf Which function should I use ..... Thank in advance for hearing me out. Kind Regards CH0VI3 Link to comment Share on other sites More sharing options...
CH0VI3 Posted April 20, 2011 Author Share Posted April 20, 2011 Hi All, I have found a solution on the issue at hand, Case $PINGB1 $s_ip = _GUICtrlIpAddress_Get($IPAddress2) If Ping($s_ip) > 0 Then Run(@ComSpec & " /c telnet ") if $s_ip <> 0 Then EndIf Sleep(500) Send("o") Sleep(500) Send("{SPACE}") Sleep(500) Send($s_ip) Sleep(300) Send("{ENTER}") Sleep(300) EndIf I have various commands that are running in this project every command is linked to a file,is there any other way to simplify all my information in all the files to be in one file? Thanx in advance, Kind Regards CH0VI3 Link to comment Share on other sites More sharing options...
CH0VI3 Posted April 21, 2011 Author Share Posted April 21, 2011 Hi All, Quick question, how do I add buttons to a specific menu tab? Example: GuiCtrlCreateMenu("Heading") and these buttons must only be seen under the tab, expandcollapse popup$JNB = GUICtrlCreateButton("JNB - A", 0, 8, 65, 25) GUICtrlSetBkColor(-1, 0xFF0000) $CT = GUICtrlCreateButton("CT - A", 70, 8, 65, 25) GUICtrlSetBkColor(-1, 0xFF0000) $DBN = GUICtrlCreateButton("DBN - A", 140, 8, 65, 25) GUICtrlSetBkColor(-1, 0xFF0000) $PE = GUICtrlCreateButton("PE - A", 210, 8, 65, 25) GUICtrlSetBkColor(-1, 0xFF0000) $EL = GUICtrlCreateButton("EL - A", 280, 8, 65, 25) GUICtrlSetBkColor(-1, 0xFF0000) $UT = GUICtrlCreateButton("UT - A", 350, 8, 65, 25) GUICtrlSetBkColor(-1, 0xFF0000) $BFT = GUICtrlCreateButton("BFT - A", 420, 8, 65, 25) GUICtrlSetBkColor(-1, 0xFF0000) $CORP = GUICtrlCreateButton("CORP - A", 490, 8, 65, 25) GUICtrlSetBkColor(-1, 0xFF0000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $JNBARC = GUICtrlCreateCombo("Record", 0, 46, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $s_data45) $CTARC = GUICtrlCreateCombo("Record", 70, 46, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $s_data35) $DBNARC = GUICtrlCreateCombo("Record", 140, 46, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $s_data25) $PEARC = GUICtrlCreateCombo("Record", 210, 46, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $s_data15) $ELARC = GUICtrlCreateCombo("Record", 280, 46, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $s_data15) $UTARC = GUICtrlCreateCombo("Record", 350, 46, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $s_data15) $BFTARC = GUICtrlCreateCombo("Record", 420, 46, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $s_data15) $CORPARC = GUICtrlCreateCombo("Record", 490, 46, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $s_data15) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $JNB1 = GUICtrlCreateButton("OK", 0, 70, 65, 17) GUICtrlSetBkColor(-1, 0x00ff00) $CT1 = GUICtrlCreateButton("OK", 70, 70, 65, 17) GUICtrlSetBkColor(-1, 0x00ff00) $DBN1 = GUICtrlCreateButton("OK", 140, 70, 65, 17) GUICtrlSetBkColor(-1, 0x00ff00) $PE1 = GUICtrlCreateButton("OK", 210, 70, 65, 17) GUICtrlSetBkColor(-1, 0x00ff00) $EL1 = GUICtrlCreateButton("OK", 280, 70, 65, 17) GUICtrlSetBkColor(-1, 0x00ff00) $UT1 = GUICtrlCreateButton("OK", 350, 70, 65, 17) GUICtrlSetBkColor(-1, 0x00ff00) $BFT1 = GUICtrlCreateButton("OK", 420, 70, 65, 17) GUICtrlSetBkColor(-1, 0x00ff00) $CORP1 = GUICtrlCreateButton("OK", 490, 70, 65, 17) GUICtrlSetBkColor(-1, 0x00ff00) Thank You in advance for your efforts, Kind Regards, CH0VI3 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