Sign in to follow this  
Followers 0
toothyXdip

adding to the x, y pos

3 posts in this topic

HEY! i havnt been on autoit for a while cause i started making games with game maker and the gml scriting (and skateboarding alot more) but anyway in the gm you can just add a amout to a pictures x, y pos and i was just wondering if there is a way to find the x, y of the pic and add amount. Ive used autoit before so its ok if its complex...also if you have anytime i still need help with these:

having a window with button and another window with a progress bar and the progress bars are auto going down and when you click the butten it adds a amount to the progress bar data. Ive tryed alot of things like setting the progress bar data to a verible and when you press the butten it just adds to the veriable...but didnt really work ill give it more thought but its 11 so i have to go to sleep but if you guys can help me that would be awesome.

Thanks,

Toothy

P.S. Is the famaus smOkin still here??? lol he is a auto it GOD


---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Im not exactly sure what you want with the (x, y) stuff, could you explain yourself further? however:

having a window with button and another window with a progress bar and the progress bars are auto going down and when you click the butten it adds a amount to the progress bar data.

;AutoIt Version: 3.2.1.14 (beta)

#include <GuiConstants.au3>

Opt("GUIOnEventMode", 1)

GuiCreate("MyGUI", 298, 68,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
$Progress_1 = GuiCtrlCreateProgress(10, 10, 280, 50)
GUISetOnEvent($GUI_EVENT_CLOSE, "_ExitScript")
GuiSetState()

GuiCreate("MyGUI2", 159, 51,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
$Button_1 = GuiCtrlCreateButton("Button1", 10, 10, 150, 40)
GUICtrlSetOnEvent($Button_1, "_Button_1pressed")
GUISetOnEvent($GUI_EVENT_CLOSE, "_ExitScript")
GuiSetState()

$ProgressBarPrecent = 100

while 1
    sleep(100)
    $ProgressBarPrecent = Number($ProgressBarPrecent - 1)
    if $ProgressBarPrecent < 0 then $ProgressBarPrecent = 0
    GUICtrlSetData( $Progress_1, $ProgressBarPrecent)
WEnd

Func _Button_1pressed()
    $ProgressBarPrecent = Number($ProgressBarPrecent + 10)
    If $ProgressBarPrecent > 100 then $ProgressBarPrecent = 100
EndFunc

Func _ExitScript()
    Exit
EndFunc

is that what you had in mind?

Edited by Kourath

Share this post


Link to post
Share on other sites

OMG thanks you so much with the progress bar thing i was making a game that needed that and know1 knew so i just quit and started using gm so now i dont have to. I can FINLLY finsh my game lol.

Oh and i just mean like you have a image and it finds the x or y place. ( like the help menu eg. that when you run it it finds the pos. kinda like that) and you set like a hot key to the left arrow and when you press the left arrow it will add like 3 to the x pos of the image so it had the apperance to be moving. I did this but it was changing the images full pos. (it was over 1200 lines of scripting for like nothing lmao. just moving 3 spaces was that much lol (if want to see it ill send it but ill have to get the pics in a folder and in script change to find them all in that folder on the desktop).

dont really know if that helps any lol

but thanks again ive tryed so many things but never that :shocked:

toothy


---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

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