Jump to content

quick help


Recommended Posts

question how do i go about taking the iniread output and input that into the remote desktop(mstsc.exe) field?

the whole purpose of the script below is a combo box input, so if i was to enter a letter into the field then press go it will go to the .ini file and see what is the corresponding computer name and then do a shell execute to bring up the rdc window and input that machine name and press connect. script im working with below (partial) im getting a syntax error. i guess im a littlwe confused on the transition of reading from the .ini file and then excuting the result via shell excute or some other way... HELP PLEASE

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>
#Include <GuiComboBox.au3>
#Include <GuiToolbar.au3>
#include <ButtonConstants.au3>

Global $Button_GO

$GUI = GUICreate("Data Operations QUICK KEYS", 435, 750, -1, -1, $WS_SIZEBOX + $WS_SYSMENU)

$PNInput = GuiCtrlCreateInput("Prog", 15, 700, 35, 20)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop

    Case $msg = $Button_GO
      $Name = GUICtrlRead($PNInput)
      $MaName = IniRead("\\finch\ceregen_it\JEGONZ\Public\DB access\machines.ini","Machines",$Name,"No Machine Listed for this Program")
      ShellExecute("mstsc.exe")
        If WinWaitActive("Remote Desktop Connection", "", 30) = 1 Then
            sleep(1000)
            send($MaName)
            sleep(1000)
            send(ENTER)
        EndIf
    
    
      
    
    EndSelect
    
WEnd
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...