Jump to content
Sign in to follow this  
Testy

Input variables

Recommended Posts

Testy

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

Share this post


Link to post
Share on other sites
evilertoaster

same with AID:

DirCopy(@MyDocumentsDir, "F:\"&$AID&"\Mydocs",1) should be DirCopy(@MyDocumentsDir, "F:\"&GUICtrlread($AID)&"\Mydocs",1)

Share this post


Link to post
Share on other sites
Testy

same with AID:

DirCopy(@MyDocumentsDir, "F:\"&$AID&"\Mydocs",1) should be DirCopy(@MyDocumentsDir, "F:\"&GUICtrlread($AID)&"\Mydocs",1)

Thanks to the both of you.

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.