NinjaGuy1337 Posted September 26, 2010 Share Posted September 26, 2010 (edited) Basically I'm making an All-In-One tool to eliminate icons on my Desktop.I can't figure out how to link one script to another.This makes the menu appear, but the buttons don't function correctly. GuiCreate("AIO Shortcut Tool",296,159,224,9)$button1=GuiCtrlCreateButton("Android",2,1,50,46)$button2=GuiCtrlCreateButton("Browsers",55,1,49,46)$button3=GuiCtrlCreateButton("CE's",107,-1,51,46)$button4=GuiCtrlCreateButton("Cleaning",161,-1,51,46)$button5=GuiCtrlCreateButton("Gaming",2,49,209,40)$button6=GuiCtrlCreateButton("Music",1,90,51,44)$button7=GuiCtrlCreateButton("Navigation",55,91,103,43)$button8=GuiCtrlCreateButton("Pics",161,91,51,42)$button9=GuiCtrlCreateButton("Webcams",1,135,134,26)$button10=GuiCtrlCreateButton("Websites",214,1,80,132)$label1=GuiCtrlCreateLabel("Created by: Dalton Nelson",150,141,127,15)GuiSetState()While 1$msg=GuiGetMsg()If $msg=-3 Then ExitIf $msg=$button1 Then Run(@ScriptDir & "AndroidGUI.au3", "", @SW_SHOWDEFAULT)If $msg=$button2 Then Run(@ScriptDir & "BrowserGUI.au3", "", @SW_SHOWDEFAULT)If $msg=$button3 Then Run(@ScriptDir & "CE's.au3", "", @SW_SHOWDEFAULT)If $msg=$button4 Then Run(@ScriptDir & "Cleaning.au3", "", @SW_SHOWDEFAULT)If $msg=$button5 Then Run(@ScriptDir & "Gaming.au3", "", @SW_SHOWDEFAULT)If $msg=$button6 Then Run(@ScriptDir & "Music.au3", "", @SW_SHOWDEFAULT)If $msg=$button7 Then Run(@ScriptDir & "Navigation.au3", "", @SW_SHOWDEFAULT)If $msg=$button8 Then Run(@ScriptDir & "Pics.au3", "", @SW_SHOWDEFAULT)If $msg=$button9 Then Run(@ScriptDir & "Webcams.au3", "", @SW_SHOWDEFAULT)If $msg=$button10 Then Run(@ScriptDir & "Websites.au3", "", @SW_SHOWDEFAULT)WendFunc button1()EndFuncFunc button2()EndFuncFunc button3()EndFuncFunc button4()EndFuncFunc button5()EndFuncFunc button6()EndFuncFunc button7()EndFuncFunc button8()EndFuncFunc button9()EndFuncFunc button10()EndFunc Edited September 26, 2010 by NinjaGuy1337 Link to comment Share on other sites More sharing options...
JohnOne Posted September 26, 2010 Share Posted September 26, 2010 Try If $msg=$button1 Then Run(@ScriptDir & "\AndroidGUI.au3", "", @SW_SHOWDEFAULT) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 26, 2010 Moderators Share Posted September 26, 2010 NinjaGuy1337,Welcome to the AutoIt forum. You need to add a "\" after @ScriptDir - AutoIt does not give you one automatically so your paths will not be correct. You might also like to look at using a Switch or Select structure for checking the value returned by GUIGetMsg - it makes for much neater and easier to maintain code. M23P.S. When you post code in the future please use Code tags. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
NinjaGuy1337 Posted September 26, 2010 Author Share Posted September 26, 2010 (edited) NinjaGuy1337, Welcome to the AutoIt forum. You need to add a "\" after @ScriptDir - AutoIt does not give you one automatically so your paths will not be correct. You might also like to look at using a Switch or Select structure for checking the value returned by GUIGetMsg - it makes for much neater and easier to maintain code. M23 P.S. When you post code in the future please use Code tags. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). Thank you. Adding the "\" didn't work though. I'll have to look into the other functions you have mentioned. I'll be sure to use your the new tag on codes as well. Edited September 26, 2010 by NinjaGuy1337 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 26, 2010 Moderators Share Posted September 26, 2010 NinjaGuy1337,Assuming you have AutoIt set up to run scripts and not edit them on opening, use ShellExecute instead of Run - I had not noticed that you were trying to run non-compiled scripts.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnOne Posted September 26, 2010 Share Posted September 26, 2010 Try using Shellexecute instead of run. And perhaps you could say whats not correct. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 26, 2010 Moderators Share Posted September 26, 2010 JohnOne, We are doing a very nice echo act here! I am off to eat - over to you. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnOne Posted September 26, 2010 Share Posted September 26, 2010 haha 1-1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
NinjaGuy1337 Posted September 26, 2010 Author Share Posted September 26, 2010 Aha! It worked! Thank you both for the help. Now I'm going to quit using this and move on to Visual Basic 2010 xD Jk. I have a LOT to learn. Any good GUID programs out there? Link to comment Share on other sites More sharing options...
ALTIN Posted September 26, 2010 Share Posted September 26, 2010 Now I'm going to quit using this and move on to Visual Basic 2010 xD Jk. I have a LOT to learn. Any good GUID programs out there?Im currently learning QT, a cross platform application and UI framework to write programs in C++, developped by Nokia. I used Visual Basic and .NET programming in the past but I dont like the fact that they run only in Windows and require .NET framework to be installed on the user pc.I actually like QT and it is very flexible in different platforms.By the way I have a question if JohnOne and Melba23 can help in anyway I read several guides on the web but I find it difficult to configure QT to statically link a program (static deploy), I mean to create an indipendent .exe standalone application that does not have other dependicies. Dont know if you used QT though... Link to comment Share on other sites More sharing options...
JohnOne Posted September 26, 2010 Share Posted September 26, 2010 Never even heard of it sorry. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
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