Jump to content

Help me..


rawrr
 Share

Recommended Posts

So heres my script..

; Icon on Button - (made easy)
; Author - Valuater

#include <GUIConstants.au3>

$mywin = GUICreate("my gui")
$btn1 = IconButton("WoW", 30, 30, 80, 32, 23)
$btn2 = IconButton("Firefox", 300, 30, 80, 32, 23)
$btn3 = IconButton("Aim", 165, 30, 70, 32, 23)
$btn4 = Iconbutton("Limewire", 90, 90, 100, 32, 23)
$btn5 = Iconbutton("Photoshop", 230, 90, 100, 32, 23)
$btn6 = Iconbutton("Websites", 165, 150, 100, 32, 23)
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $btn1 Then run ("C:\Program Files\World Of Warcraft\Wow.exe")
    If $msg = $btn2 Then run ("C:\Program Files\Mozilla Firefox\firefox.exe")
    If $msg = $btn3 Then run ("C:\Program Files\AIM\aim.exe")
    If $msg = $btn4 Then run ("C:\Program Files\Limewire\Limewire.exe")
    If $msg = $btn5 Then run ("C:\Program Files\Adobe\Adobe Photoshop CS3\Photoshop.exe")
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
    
Func IconButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $BIconNum, $BIDLL = "shell32.dll")
    GUICtrlCreateIcon($BIDLL, $BIconNum, $BIleft + 5, $BItop + (($BIheight - 16) / 2), 16, 16)
    GUICtrlSetState( -1, $GUI_DISABLE)
    $XS_btnx = GUICtrlCreateButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $WS_CLIPSIBLINGS)
    Return $XS_btnx
EndFunc

I'm making easy access to some of my stuff.. I need help because I want button 6.. "Websites" to open up another GUI so I can list some cool websites for easy access.. I know this is probably done somewhere, but I wanted to give it a shot.

Thanks in advance.

EDIT: Oh! I'm sorry, I think this is supposed to be in GUI help.. =( Sorry..

Edited by rawrr
Link to comment
Share on other sites

Something like this?

; Icon on Button - (made easy)
; Author - Valuater

#include <GUIConstants.au3>

$mywin = GUICreate("my gui")
$btn1 = IconButton("WoW", 30, 30, 80, 32, 23)
$btn2 = IconButton("Firefox", 300, 30, 80, 32, 23)
$btn3 = IconButton("Aim", 165, 30, 70, 32, 23)
$btn4 = Iconbutton("Limewire", 90, 90, 100, 32, 23)
$btn5 = Iconbutton("Photoshop", 230, 90, 100, 32, 23)
$btn6 = Iconbutton("Websites", 165, 150, 100, 32, 23)
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $btn1 Then run ("C:\Program Files\World Of Warcraft\Wow.exe")
    If $msg = $btn2 Then run ("C:\Program Files\Mozilla Firefox\firefox.exe")
    If $msg = $btn3 Then run ("C:\Program Files\AIM\aim.exe")
    If $msg = $btn4 Then run ("C:\Program Files\Limewire\Limewire.exe")
    If $msg = $btn5 Then run ("C:\Program Files\Adobe\Adobe Photoshop CS3\Photoshop.exe")
    If $msg = $btn6 Then _CreateChild()
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
    
Func IconButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $BIconNum, $BIDLL = "shell32.dll")
    GUICtrlCreateIcon($BIDLL, $BIconNum, $BIleft + 5, $BItop + (($BIheight - 16) / 2), 16, 16)
    GUICtrlSetState( -1, $GUI_DISABLE)
    $XS_btnx = GUICtrlCreateButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $WS_CLIPSIBLINGS)
    Return $XS_btnx
EndFunc

Func _CreateChild()
    GUISetState(@SW_DISABLE,$mywin)
    $Child=GUICreate("Websites",200,200,-1,-1,-1,-1,$mywin)
    GUISetState()
    While 1
        $msg1 = GUIGetMsg()
        Switch $msg1
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd
    GUIDelete($Child)
    GUISetState(@SW_ENABLE,$mywin)
    
    Return
EndFunc
Link to comment
Share on other sites

Something like this?

; Icon on Button - (made easy)
; Author - Valuater

#include <GUIConstants.au3>

$mywin = GUICreate("my gui")
$btn1 = IconButton("WoW", 30, 30, 80, 32, 23)
$btn2 = IconButton("Firefox", 300, 30, 80, 32, 23)
$btn3 = IconButton("Aim", 165, 30, 70, 32, 23)
$btn4 = Iconbutton("Limewire", 90, 90, 100, 32, 23)
$btn5 = Iconbutton("Photoshop", 230, 90, 100, 32, 23)
$btn6 = Iconbutton("Websites", 165, 150, 100, 32, 23)
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $btn1 Then run ("C:\Program Files\World Of Warcraft\Wow.exe")
    If $msg = $btn2 Then run ("C:\Program Files\Mozilla Firefox\firefox.exe")
    If $msg = $btn3 Then run ("C:\Program Files\AIM\aim.exe")
    If $msg = $btn4 Then run ("C:\Program Files\Limewire\Limewire.exe")
    If $msg = $btn5 Then run ("C:\Program Files\Adobe\Adobe Photoshop CS3\Photoshop.exe")
    If $msg = $btn6 Then _CreateChild()
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
    
Func IconButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $BIconNum, $BIDLL = "shell32.dll")
    GUICtrlCreateIcon($BIDLL, $BIconNum, $BIleft + 5, $BItop + (($BIheight - 16) / 2), 16, 16)
    GUICtrlSetState( -1, $GUI_DISABLE)
    $XS_btnx = GUICtrlCreateButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $WS_CLIPSIBLINGS)
    Return $XS_btnx
EndFunc

Func _CreateChild()
    GUISetState(@SW_DISABLE,$mywin)
    $Child=GUICreate("Websites",200,200,-1,-1,-1,-1,$mywin)
    GUISetState()
    While 1
        $msg1 = GUIGetMsg()
        Switch $msg1
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd
    GUIDelete($Child)
    GUISetState(@SW_ENABLE,$mywin)
    
    Return
EndFunc

Thanks a lot. It helped =).

Link to comment
Share on other sites

Bumping. Sorry for double post.. But I have another question..

Whats the code to make a site come up?

if $msg = $btn11 then
What goes after "then"? Say I want to open this website..

Can I have the code so that it opens in Internet Explorer

And

Mozilla Firefox, please?

Thanks!!

Edited by rawrr
Link to comment
Share on other sites

For internet explorer, an option is:

_IECreate("url")

I don't know how to pass an url to Firefox, but if it's your default browser then this will work:

ShellExecute("www.google.com")

I'm trying now.. Thanks!

EDIT: None of them work..

Edited by rawrr
Link to comment
Share on other sites

Try this. There's clearly something wrong in yuor code, not in mine.

; Icon on Button - (made easy)
; Author - Valuater

#include <GUIConstants.au3>

$mywin = GUICreate("my gui")
$btn1 = IconButton("WoW", 30, 30, 80, 32, 23)
$btn2 = IconButton("Firefox", 300, 30, 80, 32, 23)
$btn3 = IconButton("Aim", 165, 30, 70, 32, 23)
$btn4 = Iconbutton("Limewire", 90, 90, 100, 32, 23)
$btn5 = Iconbutton("Photoshop", 230, 90, 100, 32, 23)
$btn6 = Iconbutton("Websites", 165, 150, 100, 32, 23)
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $btn1 Then run ("C:\Program Files\World Of Warcraft\Wow.exe")
    If $msg = $btn2 Then run ("C:\Program Files\Mozilla Firefox\firefox.exe")
    If $msg = $btn3 Then run ("C:\Program Files\AIM\aim.exe")
    If $msg = $btn4 Then run ("C:\Program Files\Limewire\Limewire.exe")
    If $msg = $btn5 Then run ("C:\Program Files\Adobe\Adobe Photoshop CS3\Photoshop.exe")
    If $msg = $btn6 Then _CreateChild()
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
   
Func IconButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $BIconNum, $BIDLL = "shell32.dll")
    GUICtrlCreateIcon($BIDLL, $BIconNum, $BIleft + 5, $BItop + (($BIheight - 16) / 2), 16, 16)
    GUICtrlSetState( -1, $GUI_DISABLE)
    $XS_btnx = GUICtrlCreateButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $WS_CLIPSIBLINGS)
    Return $XS_btnx
EndFunc

Func _CreateChild()
    GUISetState(@SW_DISABLE,$mywin)
    $Child=GUICreate("Websites",200,200,-1,-1,-1,-1,$mywin)
    $Google=GUICtrlCreateButton("Google",50,50)
    GUISetState()
    While 1
        $msg1 = GUIGetMsg()
        Switch $msg1
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $Google
                ShellExecute("www.google.com")
        EndSwitch
    WEnd
    GUIDelete($Child)
    GUISetState(@SW_ENABLE,$mywin)
   
    Return
EndFunc
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...