Sign in to follow this  
Followers 0
The_Noob

Why cant i do this?

6 posts in this topic

#1 ·  Posted (edited)

#include <GUIConstants.au3>
#include <IE.au3> 
Global $Paused

WinSetOnTop("quest", "", 0)

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("MoveQuest",1024,768);,-1,-1,$WS_SIZEBOX)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\DontDrinkBleach\My Documents\My Pictures\QuestMain.bmp", 0, 0, 1024, 768)
$Label1 = GUICtrlCreateLabel("Ok Heres what i did...                                                               I Decided it was easier to make Quest move if it had a frame that could be moved... So this is the frame.                        This frame gets the location on your desktop, and then moves and resizes the window to fit inside the borders.                                              Cool, eh?                                                                                                                                                                                                                                                            Ok that button on the side is made to stop the client.exe process. This is usefull if Quest loses connection and dissapears. You dont need to use control alt delete, just push that button and its done!                                                                                                                                                                                                                                                                                                                                                                                                                   Created By: Jon_Deciple", 280, 40, 291, 225)
$Button1 = GUICtrlCreateButton("Kill Quest!", 600, 48, 161, 49, 0)
$Button2 = GUICtrlCreateButton("Check Server Status", 600, 144, 161, 49, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###



$lastpos = WinGetPos ( "MoveQuest" ) 
$pos = WinGetPos ( "MoveQuest" ) 
winactivate("quest")
do
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then 
        Exit
    Elseif $msg = $Button1 Then
        
                
        ProcessClose( "client.exe" )
        MsgBox(1,"Done", "Quest client is killed")
    elseif $msg = $Button2 Then
        $oIE = _IECreate ("http://quest.weebl.nl/line.php")
    EndIf
    
    $lastpos[0] = $pos[0]
    $lastpos[1] = $pos[1]
    $lastpos[2] = $pos[2]
    $lastpos[3] = $pos[3]
    $pos = WinGetPos ( "MoveQuest" ) 
    WinMove ( "quest", "", $pos[0]+3, $pos[1]+29, $pos[2]-6 , $pos[3]-32 )
    if wingetstate("MoveQuest") = 15 then
        winactivate("quest")
    endif

until 1 = 2

So as u can see, im trying to make a window with a background image, and buttons that work. Shouldnt be that hard, right? wrong. The buttons work once, maybe twice, then everything stops working. can somon tell me why?

Also if theres a way to make the background image be there without needing to distribute the image file with the exe, please let me know.

Edited by The_Noob

Share this post


Link to post
Share on other sites



If you are going to compile your script you will have to include the pic with the script using FileInstall.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

sweet it works. Thanks. now lets say i wanted to use a series of boxes and stuff to "re-create" the picture... how would i do that? what sort of box do you suggest i use? text boxes, message boxes? any suggestions here?

Share this post


Link to post
Share on other sites

sweet it works. Thanks. now lets say i wanted to use a series of boxes and stuff to "re-create" the picture... how would i do that? what sort of box do you suggest i use? text boxes, message boxes? any suggestions here?

HI,

what? Could you explain with other words what you want to do? :">

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

I think he wants to cut an image up into pieces and then regroup it into a complete picture.

No idea how he will 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