Sign in to follow this  
Followers 0
Gif

HELPPPPPP

7 posts in this topic

#1 ·  Posted (edited)

-edit-

Edited by c4nm7

Share this post


Link to post
Share on other sites



Ok several things worng here:

1. You need to be polite

2. use AutoIt tags

3. You didnt say whats wrong with it.

4. BE POLITE!!!!!

5. You obviously havn't looked at the help file examples.

6. You need a GUISetState( )


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites

2 things,

A missing title parameter in one of the message boxes,

Should be like this:

MsgBox(64, "Title","ShUtdoWn v 1.0.0 is created By Tefkros Pavlou using AutoIt." & @CRLF & "www.c4nm7.co.sr" & @CRLF & "Email: pavloutefkros@gmail.com")

And a missing GUISetState() before your while statement.

Share this post


Link to post
Share on other sites

You didn't run Tidy on it and put it in an autoit box? :shocked:

The real problem is that GUI's are created out of sight, and not visible until you do GuiSetState() on them. Plus, your fist MsgBox was missing a parameter:

; Create GUI
GUICreate("ShUtdoWn v1.0.0 By Tefkros Pavlou", 410, 150, -1, -1)
GUISetBkColor(0x0080FF)

; Add controls
$lbl_First = GUICtrlCreateLabel("Choose below : ", 10, 10, 55, 20)
$btn_shutdown = GUICtrlCreateButton("ShutDown", 10, 40, 40, 30)
$btn_restart = GUICtrlCreateButton("Restart", 60, 40, 40, 30)
$btn_logoff = GUICtrlCreateButton("Log Off", 110, 40, 40, 30)
$btn_hibernate = GUICtrlCreateButton("HiberNate", 160, 40, 40, 30)
$btn_poweroff = GUICtrlCreateButton("Power Off", 210, 40, 40, 30)
$btn_forcerestart = GUICtrlCreateButton("Force Restart", 310, 40, 40, 30)
$btn_suspend = GUICtrlCreateButton("Suspend", 360, 40, 40, 30)
$btn_About = GUICtrlCreateButton("About", 180, 90, 50, 18)
$btn_Info = GUICtrlCreateButton("Info", 220, 90, 50, 18)
$btn_Exit = GUICtrlCreateButton("Exit", 360, 90, 20, 10)
GUISetState()

; GUI message loop
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $btn_shutdown
            Shutdown(1)
        Case $msg = $btn_restart
            Shutdown(2)
        Case $msg = $btn_logoff
            Shutdown(0)
        Case $msg = $btn_hibernate
            Shutdown(64)
        Case $msg = $btn_poweroff
            Shutdown(8)
        Case $msg = $btn_forcerestart
            Shutdown(6)
        Case $msg = $btn_suspend
            Shutdown(32)
        Case $msg = $btn_About
            MsgBox(64, "About", "ShUtdoWn v 1.0.0 is created By Tefkros Pavlou using AutoIt." & @CRLF & _
                    "www.c4nm7.co.sr" & @CRLF & _
                    "Email: pavloutefkros@gmail.com")
        Case $msg = $btn_Info
            MsgBox(0, "Info", "HiberNate is a windows function that turns off your computer normally" & @CRLF & _
                    "but when you boot your windows again everything" & @CRLF & _
                    "is left as you left it, no window is closed.")
        Case $msg = $btn_Exit
            Exit
    EndSelect
WEnd

Now fix the button sizes and locations...

:(


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Thanks a lot all of you , sorry for my bad english, i am a foreigner.

Also sorry for my behavior.

Share this post


Link to post
Share on other sites

Thanks a lot all of you , sorry for my bad english, i am a foreigner.

Also sorry for my behavior.

I didn't find your original post rude. It is better to post specific symptoms though, i.e. "The GUI never displays."

P.S. Welcome to AutoIt!

:shocked:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

sorry, I'm in a bad mood right now. "Less demanding" would have been better.


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

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