
edsager
Members-
Posts
8 -
Joined
-
Last visited
Everything posted by edsager
-
DriveMapAdd with GUI made with Koda
edsager replied to edsager's topic in AutoIt General Help and Support
Nahuel, Thank you very much. I was confused by the extra lines in the original Koda code. Also, what you altered not only help me understand what I was doing, but also made the script work as I desired. As for: CODEFunc btnOKClick() ;I don't know what you'd want to do here, since the mapping seems to be done ;When you click on a checkbox... EndFunc ;==>btnOKClick I wanted to have the network shares mapped after clicking the "OK" button. So, I figured I would have to change the GUICtrlSetOnEvent of the checkboxes to something like "SpecialEvents," as shown in the AutoIt example titled, "GUICtrlSetOnEvent." Instead, I got rid of the "OK" button and changed the "Cancel" button to read "Complete." Again, thank you, edsager -
Hello All, I think I am a little in over my head, but I also think that if I can understand Functions and calling Functions, I will be able to do what I desire: I have a piece of software on my Laptop which synchronizes files between my Laptop (XP Home) and Desktop (Vista Ultimate 32-bit). Because of the new file system in Vista (as well as documents on various hard drives on the Desktop), I have several network shares which need to be mapped before the synchronizing can occur. I created with Koda a GUI offering me the opportunity to choose among five (5) network shares using checkboxes, but I cannot get the functions for the checkboxes working. In fact, I cannot seem to adapt the "OK" button (which should start the mapping) and "Cancel" button (which should cancel and close the GUI). I am a novice, so this may be beyond me, but I am not sure. I include a copy of the code as well as an upload of the code. I am mainly looking to find information so that I can learn a sufficient amount to finish my task, but any type of help would be wonderful. Thank you for any help you can provide, edsager CODE#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form=form2.kxfdocuments\sync files\scripting\autoit\form2.kxf $Form1_1 = GUICreate("Choose network map...", 661, 441, 204, 157, BitOR($WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS)) GUISetIcon("D:03.ico") GUISetFont(11, 400, 0, "Verdana") GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1_1Minimize") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1_1Maximize") GUISetOnEvent($GUI_EVENT_RESTORE, "Form1_1Restore") $grpChoices = GUICtrlCreateGroup("Mapping choices: ", 5, 5, 650, 360) GUICtrlSetFont(-1, 16, 400, 0, "Verdana") $ckbxFlash = GUICtrlCreateCheckbox("Edward\Flash Projects", 395, 155, 225, 30) GUICtrlSetFont(-1, 12, 800, 0, "Verdana") GUICtrlSetResizing(-1, $GUI_DOCKHCENTER+$GUI_DOCKVCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlSetOnEvent(-1, "ckbxFlashClick") $ckbxDocs = GUICtrlCreateCheckbox("Edward\Documents", 235, 65, 200, 30) GUICtrlSetFont(-1, 12, 800, 0, "Verdana") GUICtrlSetResizing(-1, $GUI_DOCKHCENTER+$GUI_DOCKVCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlSetOnEvent(-1, "ckbxDocsClick") $ckbxSoft = GUICtrlCreateCheckbox("Edward\EdsSoftware", 50, 155, 215, 30) GUICtrlSetFont(-1, 12, 800, 0, "Verdana") GUICtrlSetResizing(-1, $GUI_DOCKHCENTER+$GUI_DOCKVCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlSetOnEvent(-1, "ckbxSoftClick") $ckbxPics = GUICtrlCreateCheckbox("Edward\Pictures", 50, 245, 175, 30) GUICtrlSetFont(-1, 12, 800, 0, "Verdana") GUICtrlSetResizing(-1, $GUI_DOCKHCENTER+$GUI_DOCKVCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlSetOnEvent(-1, "ckbxPicsClick") $ckbxDownloads = GUICtrlCreateCheckbox("Edward\Downloads", 395, 245, 195, 30) GUICtrlSetFont(-1, 12, 800, 0, "Verdana") GUICtrlSetResizing(-1, $GUI_DOCKHCENTER+$GUI_DOCKVCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlSetOnEvent(-1, "ckbxDownloadsClick") $iconDocs = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -127, 315, 95, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetOnEvent(-1, "ckbxDocsClick") $iconSoft = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -5, 137, 185, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetOnEvent(-1, "ckbxSoftClick") $iconFlash = GUICtrlCreateIcon("C:\Program Files\Adobe\Adobe Flash CS3\Flash.exe", -6, 495, 185, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetOnEvent(-1, "ckbxFlashClick") $iconDownloads = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -89, 495, 275, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetOnEvent(-1, "ckbxDownloadsClick") $iconPics = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -128, 137, 275, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetOnEvent(-1, "ckbxPicsClick") GUICtrlCreateGroup("", -99, -99, 1, 1) $btnOK = GUICtrlCreateButton("&OK", 110, 380, 135, 45, 0) GUICtrlSetFont(-1, 10, 400, 0, "Verdana") GUICtrlSetOnEvent(-1, "btnOKClick") $btnCancel = GUICtrlCreateButton("&Cancel", 415, 380, 135, 45, 0) GUICtrlSetFont(-1, 10, 400, 0, "Verdana") GUICtrlSetOnEvent(-1, "btnCancelClick") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func btnCancelClick() While 1 $btnCancel = GUIGetMsg() If $btnCancel = $GUI_EVENT_CLOSE Then ExitLoop Wend EndFunc Func btnOKClick() EndFunc Func ckbxDocsClick() ; Disconnect DriveMapDel("Z:") ; Map Z drive DriveMapAdd("Z:", "\\Edward\Users\Edward P. Sager\Documents") EndFunc Func ckbxDownloadsClick() ; Disconnect DriveMapDel("S:") ; Map S drive DriveMapAdd("S:", "\\Edward\Downloads") EndFunc Func ckbxFlashClick() ; Disconnect DriveMapDel("X:") ; Map X drive DriveMapAdd("X:", "\\Edward\Flash Projects") EndFunc Func ckbxPicsClick() ; Disconnect DriveMapDel("W:") ; Map W drive DriveMapAdd("W:", "\\Edward\Users\Edward P. Sager\Pictures") EndFunc Func ckbxSoftClick() ; Disconnect DriveMapDel("Y:") ; Map Y drive DriveMapAdd("Y:", "\\Edward\EdsSoftware") EndFunc Func Form1_1Close() EndFunc Func Form1_1Maximize() EndFunc Func Form1_1Minimize() EndFunc Func Form1_1Restore() EndFunc GUI_3.au3
-
Hello, Wooltown: Thank you for that link. I do have that executable already, but I wanted to do something on my own using AutoIt so that no copyright issues occur. ChrisL: Thank you for the code. It works great and is exactly for what I was looking. All is good now. Thanks to both of you, edsager
-
Hello All, I have searched and searched and I cannot figure out what to include in the .exe which is called on an autorun CD. I understand the .inf file and the calling of an executable, but what goes in the executable? I am trying to have an html file (index.html) open when the CD is inserted. The .inf file has the following: [Autorun] open=AutoRunNow.exe ICON=LogoLogo.ico [AutoRunNow] Run=index.html For whatever frustrating reason, I cannot figure out what code should go in the AutoRunNow.exe. Any help? Thanks, edsager
-
Thank you. I tried that and it still will not play the chimes.wav when successful, and it still plays the chord.wav when unsuccessful. Also, as per your suggestion, I got rid of the last SoundPlay. I am a bit at a loss and corn-fused as to why it will not work. The .wav files are exactly where they should be on the hard drive. Again, thank you, edsager
-
Hello, I include my little code to help understand my situation: ;Open up EdLaptop to Y DriveMapAdd ("Y:", "\\EdLaptop\EdLaptop") Select Case @error="" SoundPlay ("C:\Windows\Media\chimes.wav") Case @error>0 SoundPlay ("C:\Windows\Media\chord.wav") MsgBox (309, "Error", "Failure to connect Network Drive.", "") EndSelect ;WinClose ("title", "") SoundPlay ("C:\Windows\Media\chimes.wav") I tried If Then statements as well, but I cannot seem to get the chimes.wav to play when teh DriveMapAdd is successful. However, if an error occurs, the chord.wav plays just fine. Any ideas? Thanks, edsager
-
Hello, I am attempting to automate keystrokes in Zone Alarm, but every time I try, the keystrokes or mouse clicks do not work. The rest of the automation (which involves opening Outlook and clicking buttons) is fine. It is just the interaction with Zone Alarm which I cannot get to work Any ideas? Thank you, Edward
-
Hello, I am trying to run Veritas software with AutoIt so that I can simply execute the compiled script at a certain time during each day to automatically backup documents onto a DVD. However, when I use the "Run" command to start the Veritas software, it gives me the error and explanation listed in this Topic Title and Topic description. I have checked and checked and the pathway and file name are both accurate, but the program will not start and the same error comes no matter where I put the executable backup program. I include the script for your review (please note that the error lists Line 5 as the line error-causing line): ; Nightly Backup to DVD Opt ("SendKeyDelay", 3000) Run ("MyCDPro.exe", "C:\Program Files\VERITAS Software\RecordNow DX", @SW_MAXIMIZE) MsgBox (0, "Auto Process Running", "Backing up Documents onto DVD", 6) WinWaitActive ("RecordNow DX Properties") Send ("!D") Send ("a") Send ("q") Send ("Y") WinWaitActive ("VERITAS RecordNow DX", "Operation completed successfully.") Send ("{ENTER}") Run ("NightlyBackup1.pxj", "C:\Documents and Settings\Edward P Sager\My Documents") WinWaitActive ("VERITAS RecordNow DX - [Job 1 - C:\Documents and Settings\Edward P Sager\My Documents\NightlyBackup1.pxj]") Send ("{F6}") WinWaitActive ("VERITAS RecordNow DX", "C:\Documents and Settings\Edward P Sager\My Documents\NightlyBackup1.pxj Completed successfully.") Send ("{ENTER}") WinWaitActive ("VERITAS RecordNow DX - [Job 1 - C:\Documents and Settings\Edward P Sager\My Documents\NightlyBackup1.pxj]") Send ("!F") Send ("x") Send ("{ENTER}") Any suggestions would be greatly appreciated. Thanks, Edward