Jump to content

Input variables


Testy
 Share

Recommended Posts

This was working when I had the input pop up in the box. But on a guicreateinput it will not insert.

#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>

$GUI = GuiCreate(" Auto-Back", 150, 95)
GuiSetIcon("C:\WINDOWS\system32\shell32.dll", 45)
GuiCtrlSetState(-1,$GUI_ONTOP)  

GuiCtrlCreateLabel("v0.1b", 340, 130, 130, 20)
GUICtrlSetColor(-1,0x867C92)

$contextMenu = GuiCtrlCreateContextMenu()
GuiCtrlCreateMenuItem("Context Menu", $contextMenu)
GuiCtrlCreateMenuItem("", $contextMenu)
GuiCtrlCreateMenuItem("&Properties", $contextMenu)

GuiCtrlSetState(-1, $GUI_ONTOP)
$Button1r1 = GUICtrlCreateButton("Backup", 10, 7, 60, 25)
$Button2r1 = GUICtrlCreateButton("Restore", 80, 7, 60, 25)
$AID = GuiCtrlCreateInput("Agent ID", 10, 40, 130, 20)
$PW = GuiCtrlCreateInput("Password", 10, 65, 130, 20)

GUISetState(@SW_SHOW)
                
While 1
$nMsg = GUIGetMsg()
    Switch $nMsg
        
        Case $Button1r1
            DirCopy(@MyDocumentsDir, "F:\"&$AID&"\Mydocs",1)
            DirCopy(@FavoritesDir, "F:\"&$AID&"\Favorites", 1)
            DirCopy(@DesktopDir, "F:\"&$AID&"\Desktop", 1)
            Run("F:\MBMR31\MBMRSU.exe")
            WinWaitActive("SuNT Logon", "", 5)
            sleep(3000)
            send($PW)
                        
        Case $Button2r1
            FileCopy("F:\"&$AID&"\Mydocs\*.*", @MyDocumentsDir, 1)
            FileCopy("F:\"&$AID&"\Favorites\*.*", @FavoritesDir, 1)
            FileCopy("F:\"&$AID&"\Desktop\*.*", @DesktopDir, 1)
            Run("F:\MBMR31\MBMRSU.exe")
            WinWait("SuNT Logon", "", 5)
                             
        Case $GUI_EVENT_CLOSE
            _Exit()
            
EndSwitch
Wend

Func _Exit()
    Exit
EndFunc
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...