dcolangelo38 Posted March 16, 2008 Posted March 16, 2008 I understand this is my bottom of my script and help? While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 (what do i put here i want to open like a folder like my documents...) EndSelect Wend
Moderators SmOke_N Posted March 16, 2008 Moderators Posted March 16, 2008 Run() / ShellExecute()? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
dcolangelo38 Posted March 16, 2008 Author Posted March 16, 2008 Run() / ShellExecute()?i am really newbie and i guess i will try shellExecute thanks...
spudw2k Posted March 16, 2008 Posted March 16, 2008 You have a few options, but it depends on what exactly you are trying to do? For a start try this.Case $msg = $button1 $file = FileOpenDialog("File to open",@WorkingDir,) msgbox(0,"You Chose",$file)That's just off the top of my head. I don't have AutoIt on this computer. But there's an idea of how to get started with whatever you're trying to acheive. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
dcolangelo38 Posted March 16, 2008 Author Posted March 16, 2008 i am really newbie and i guess i will try shellExecute thanks...wow, i am still confused i just want to open up a folder by pressing a button wtf? would i use it as a link with shellExecute? to like my documents
Moderators SmOke_N Posted March 16, 2008 Moderators Posted March 16, 2008 wow, i am still confused i just want to open up a folder by pressing a button wtf? would i use it as a link with shellExecute? to like my documentsShellExecute(@MyDocumentsDir) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
dcolangelo38 Posted March 16, 2008 Author Posted March 16, 2008 ShellExecute(@MyDocumentsDir)i just tried that and it doesnt open up my docs here is my script... i am trying to make a program that opens up then you choose were you want to go around your cpu so i want to hit a button then go to that folder...#include <GUIConstants.au3>#Region ### START Koda GUI section ### Form=$Form1 = GUICreate("Form1", 441, 166, 193, 125)$Button1 = GUICtrlCreateButton("School", 320, 128, 105, 25, 0)$Button2 = GUICtrlCreateButton("Music", 168, 128, 105, 25, 0)$Button3 = GUICtrlCreateButton("Programs", 8, 128, 105, 25, 0)$Label1 = GUICtrlCreateLabel("Desktop In A BoX...Chose What You Would Like To Do?", 8, 80, 419, 27)GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\IBM\My Documents\My Pictures\BOX!.bmp", 0, 0, 76, 68, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))$Pic2 = GUICtrlCreatePic("C:\Documents and Settings\IBM\My Documents\My Pictures\BETA.bmp", 320, 8, 108, 60, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 ShellExecute(@MyDocumentsDir) EndSelectWend
Moderators SmOke_N Posted March 16, 2008 Moderators Posted March 16, 2008 Works fine for me:#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 441, 166, 193, 125) $Button1 = GUICtrlCreateButton("School", 320, 128, 105, 25, 0) $Button2 = GUICtrlCreateButton("Music", 168, 128, 105, 25, 0) $Button3 = GUICtrlCreateButton("Programs", 8, 128, 105, 25, 0) $Label1 = GUICtrlCreateLabel("Desktop In A BoX...Chose What You Would Like To Do?", 8, 80, 419, 27) GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS") $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\IBM\My Documents\My Pictures\BOX!.bmp", 0, 0, 76, 68, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $Pic2 = GUICtrlCreatePic("C:\Documents and Settings\IBM\My Documents\My Pictures\BETA.bmp", 320, 8, 108, 60, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### START Koda GUI section ### Form= While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 ShellExecute(@MyDocumentsDir) EndSelect WEndBe sure you are using the "School" button which is button 1 in your gui. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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