
DaRkf0x
Members-
Posts
15 -
Joined
-
Last visited
DaRkf0x's Achievements

Seeker (1/7)
0
Reputation
-
When you describe variables with "" they don't get used, whatever goes inside the "" is just output as text, if you want to use the variables, then just take the "" out For instance: msgbox(0,"test","$variable1") ; gives a messagebox with the text $variable1 msgbox(0,"test",$variable1) ; gives a messagebox in which the text is the actual content of the variable With "" the variable itself gets recognized as text, instead of it's contents EDIT: typos... must wake up...
-
Gui Form docking not working right?
DaRkf0x replied to DaRkf0x's topic in AutoIt GUI Help and Support
Oh I shall study that code then Thank you very much -
Gui Form docking not working right?
DaRkf0x replied to DaRkf0x's topic in AutoIt GUI Help and Support
Thanks Yeah I ended up setting the start coordinates by hand, which was no big deal anyway. What I would like to know now is how do I make it fixed in that position, so as one cannot move it anywhere -
Can't understand argumented variables..
DaRkf0x replied to DaRkf0x's topic in AutoIt General Help and Support
Ah cool, so I can just use Target() instead of Call("Target"), that really saves a lot of code as in the script I'm making I tend to make a -lot- of calls. (I like to leave the code all neat and tidy and find that isolating it in functions, particularly when looping, is the best way to keep it simple and makes it easier to debug, for me) That really was helpful, thank you all (Now onto my other topic on GUI docking which isn't working ' ) -
Hello I'm making a GUI with Koda and so far so good but I have one problem, when _I run it, the gui isn't docked where I told it to.. This is the code generated by Koda: #include <Misc.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> if _Singleton("Car Town Bot",1) = 0 Then Msgbox(0,"Warning","*** **** *** is already running!") Exit EndIf Opt("GUIOnEventMode", 1) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP) #Region ### START GUI section ### $Form1 = GUICreate("************t! v 2.5b", 448, 100, 0, 0) $MenuItem1 = GUICtrlCreateMenu("&Main") $MenuItem2 = GUICtrlCreateMenuItem("Startup", $MenuItem1) GUICtrlSetOnEvent(-1, "Startup") $MenuItem3 = GUICtrlCreateMenuItem("Exit F10", $MenuItem1) GUICtrlSetOnEvent(-1, "_Terminate") $MenuItem4 = GUICtrlCreateMenu("&Jobs") $MenuItem6 = GUICtrlCreateMenuItem("***********e F6", $MenuItem4) GUICtrlSetOnEvent(-1, "JobDice") $MenuItem7 = GUICtrlCreateMenuItem("************ F7", $MenuItem4) GUICtrlSetOnEvent(-1, "JobOil") $MenuItem5 = GUICtrlCreateMenu("&*****e F8") GUICtrlSetOnEvent(-1, "**********") $MenuItem8 = GUICtrlCreateMenu("&Pause F9"&@TAB&"F9") GUICtrlSetOnEvent(-1, "_Pause") GUISetOnEvent($GUI_EVENT_CLOSE, "_Terminate") $Progress1 = GUICtrlCreateProgress(112, 24, 329, 33) $Label1 = GUICtrlCreateLabel("Progress:", 112, 0, 48, 17) $Label2 = GUICtrlCreateLabel("Status :", 0, 0, 40, 17) $Label3 = GUICtrlCreateLabel(" Stand By.", 0, 24, 100, 33) GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xFF0000) Dim $Form1_AccelTable[1][2] = [["{F9}", $MenuItem8]] GUISetAccelerators($Form1_AccelTable) GUISetState(@SW_SHOW) #EndRegion ### END GUI section ### What exactly am I doing wrong here? EDIT: it was supposed to be docked in the top right corner of the screen, and it starts in the top left, and about 5pixels off the screen, that is, not even docked anywhere I think. . . EDIT2: Nevermind, ended up setting the form position by hand, even if it isn't fixed.
-
Can't understand argumented variables..
DaRkf0x replied to DaRkf0x's topic in AutoIt General Help and Support
Ahhh I see that simplifies it even further I'm loving AutoIt more and more by the day -
Can't understand argumented variables..
DaRkf0x replied to DaRkf0x's topic in AutoIt General Help and Support
I see whre you're getting, and so far I've understood it! Thank you both All I wanted to know was if I could assign a value to a variable while calling a function so that the variable will be used within the function with the value defined by the call. In that case all I have to do is add the variable to the function argument in - Function Target($var) - and define it when calling the function with - Call("Target",[value]) right? Also I came to realize I won't be needing a defined function for the particular case I'm analysing, but anyway it was a doubt I always add about Functions/Calls and it's now solved Thanks -
Hello everyone Sorry if this seems pretty dumb to all of you, but i just can't understand how to make a function that uses two variables and then call that function giving them different values everytime. Imagine I want the function to click four different places on the screen, and I want the call to define those places, while the function has only 2 variables for x and y. something like: Call("TargetFunction", ?? ) Func TargetFunction() Mouseclick($Xvar,$Yvar, bla bla bla) EndFunc Is there any way around this? I've searched here, after reading the help files, but couldn't work it out. . .
-
Conditional click still clicking on wrong conditions?
DaRkf0x replied to DaRkf0x's topic in AutoIt General Help and Support
It's a browser application, not fullscreen, and normally there is a dark gray background, and i want it to click when dialog appears, the pixel is then in the middle of a white cross amidst a dark red oval button =\ -
Conditional click still clicking on wrong conditions?
DaRkf0x replied to DaRkf0x's topic in AutoIt General Help and Support
Thanks for clearing that up, and for pointing out that the function shouldn't be moving the mouse, it's a huge step as now I know something is definitely wrong. Just need to figure out what -
Conditional click still clicking on wrong conditions?
DaRkf0x replied to DaRkf0x's topic in AutoIt General Help and Support
That could happen if I had switched the coordinates, like (y,x) instead of (x,y), but i'm pretty sure those are correct, in fact you can see the function is using, for example, x = 901, y = 285 for both MouseClick and PixelGetColor and I think it wouldn't be searching in a wrong place unless between processes it would change environment and/or they were relative coordinates.. You think maybe color shades have anything to do with it as normally that pixel is dark gray? Or maybe converting the color to Hex would help? Or maybe I'm getting this wrong and AutoIt just moves the mouse to said coordinates to check the pixel without clicking it, which would be weird but still possible... -
Glad you did then I personally use the good old: hotkeyset("{ESC}","Terminate") hotkeyset("{Pause}","Pause") Func Terminate() Msgbox(0,"Bye!","Car Town Job Bot now closing! Bye") Exit EndFunc Func Pause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip("Script is Paused!",0,0) WEnd EndFunc
-
Dunno about them, but for me either version always told me correctly if I lost or won the game I agree with changing the fonts though, it gets a little rough on the eyes.. Also you could add a right click function, as in we could right click on a square we knew that had a mine and it would be flagged and instead of a cardinal you could put as asterisk or just change color, what do you think?
-
I think what he meant is "You can't -pause- the program and change the script." If you pause the program, change the script and then un-pause the program, it will still be running the old script. Any changes are only applied the next time a script is run, so in order to apply any changes to the code you must fully close the script, make the changes, save and then restart the script.
-
Hello all First of all, don't be too harsh on me, I have little background in programming and although I've been using autoIt for some time, I never gave much thought into actually learning it as I don't have that much time AND I never really needed to, although I love it. That being said, I'm trying to make a script that will click certain positions when, in a certain place, a popup will open (so as to close it) using: MouseClick("left",818,242,1) ; close popup MouseClick("left",899,277,1) ; close erroneous dialog Mouseclick("left",901,287,1) ; close random dialog MouseClick("left",413,153,1) ; mandatory click sleep(500) And it was working fine! But Now I've decided I don't want so many useless clicks, so I'm trying to make it click only if the pure white color is present (there is an X mark on the dialog which is pure white, and that pixel is never white unless the dialog is open). What I'm using is: MouseClick("left",818,242,1) ; close popup $color = pixelgetcolor(902,275) if $color = 16777215 then Mouseclick("left",902,275,1) ; close erroneous dialog EndIf $color = pixelgetcolor(901,285) if $color = 16777215 then Mouseclick("left",901,285,1) ; close random dialog EndIf MouseClick("left",413,153,1) ; mandatory click sleep(500) Thing is, I still see the mouse moving to all those pixels! I mean two of them are mandatory clicks, but the other two are not, but the mouse still goes there and thus I still waste time going to uneeded places! What am I doing wrong? EDIT: Just realized I said some things I shouldn't in the post, and edited it so I don't break any rules. Sorry for anything.