Sign in to follow this  
Followers 0
NinjaGuy1337

Multi-script linking?

11 posts in this topic

#1 ·  Posted (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 Exit

If $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)

Wend

Func button1()

EndFunc

Func button2()

EndFunc

Func button3()

EndFunc

Func button4()

EndFunc

Func button5()

EndFunc

Func button6()

EndFunc

Func button7()

EndFunc

Func button8()

EndFunc

Func button9()

EndFunc

Func button10()

EndFunc

Edited by NinjaGuy1337

Share this post


Link to post
Share on other sites



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. :shocked:

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). :)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (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. :shocked:

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 by NinjaGuy1337

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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... ;)

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  
Followers 0