TomaSzz Posted May 26, 2010 Share Posted May 26, 2010 (edited) so .here i am again wit another question how do i call 2 functions? is it Call("func1+func2") ? i gues it aint.. :/ or i can just write down like Call("1") Call("2") " _1() Return" i ave the return thingy after so tahts why im asking Edited May 26, 2010 by TomaSzz Link to comment Share on other sites More sharing options...
Affe Posted May 26, 2010 Share Posted May 26, 2010 (edited) so .here i am again wit another question how do i call 2 functions? is it Call("func1+func2") ? i gues it aint.. :/ Once again, you don't use "Call". If you would like to have one function call two functions, you can do the following: Func Function1() MsgBox(0, "", "Hello") Endfunc Func Function2() MsgBox(0, "", "How are you?") Endfunc Func Function3() Function1() Function2() Endfunc Function3 will call Function1 and then Function2. You cannot execute 2 functions at a simultaneous time: Computers handle orders one step at a time. Edited May 26, 2010 by Affe [center][/center] Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 26, 2010 Share Posted May 26, 2010 What do you mean by the "+" operator? Do want the sum of the return values from the two functions? $iAnswer = _One(3) + _Two(1) ConsoleWrite("$iAnswer = " & $iAnswer & @LF) Func _One($iIn) Return $iIn - 2 EndFunc Func _Two($iIn) Return $iIn + 1 EndFunc 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 Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 meh its ok.. and no PsaltyDS btw how do i make slider read a bar and if the bar moved lower or higher then press mouse on the place where it moved.. ? i read help file but that didnt hit me at all Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 i did like this but dont work at all $bar = PixelSearch(65, 25, 245, 31, 0xA30B00, 3) If Not @error Then $slider1 = 0 $slider1 = GUICtrlRead($bar) do MouseClick( positions here ) $slider1 = $slider + 1 sleep(100) until $bar = $slider1 Link to comment Share on other sites More sharing options...
Affe Posted May 26, 2010 Share Posted May 26, 2010 1) I don't know what you mean by "slider", but your above code is all wrong. 2) Please, PLEASE learn to use the "edit" function on this site. You have been double posting all over the place. [center][/center] Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 ok ..what i tryed to do by that code was.. scan a red bar with few pixel shades where red color ends send("5") or mouseclick... and keep scanning again man its so hard to explain for me im lithuanian... Link to comment Share on other sites More sharing options...
JohnOne Posted May 26, 2010 Share Posted May 26, 2010 do like on that see it work If not isthearray(bar) well Next = $forsure End AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 do like on that see it work If not isthearray(bar) well Next = $forsure End hmm i dont get this code... :| Link to comment Share on other sites More sharing options...
JohnOne Posted May 26, 2010 Share Posted May 26, 2010 :party: AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 (edited) stop yeling at me any other way to do the thing? Edited May 26, 2010 by TomaSzz Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 26, 2010 Moderators Share Posted May 26, 2010 TomaSzz,Calm down. You are among friends here, but you are becoming your own worst enemy. Every day you come here firing off questions with very little code to work on and often very little explanation as to what you are trying to do. We are not mind-readers nor magicians - we can only help if you try to help us. At the moment all you are doing is annoying the very people who could help you. Remember what I said to you earlier? You need to sit down and work out what you wan to do BEFORE you start codiing - that way you have a fighting chance to get some reasonable structure in your script. At the moment you give the impression that you are just randomly picking subjects on which to post.You are trying to run before you can walk. I strongly suggest that you rein in your ambitions and start coding simpler scripts until you have a better understanding of AutoIt - and coding in general. The basic questions you have been asking today (how to return from functions - can you run 2 functions simultaneously) show how little you understand at the moment. There is nothing wrong with that - we all started there - but you must know your own limits and extend them as your experience grows. Otherwise you end up with some scrappy code you do not understand and you will have to ask for help again and again - which will be frustrating for both you and us.So, do not get discouraged - we are here to help - but do try and increase your current knowledge of AutoIt and coding by trying to code simpler projects. Ambition is a good thing, but so is realism. M23  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 (edited) i just want to make a slider where u can choose from 1-100 in steps of 10 and pixel search red bar of 300,20 dimensions and send some keyboard button when that red bar is gone at 10-20-30-40-50-60-70-80-90 steps.. and i dont have a code at all only that there on top that i tryed... but its totaly wrong as posted below it EDIT: im going over all slider help files but still i cant figure anythig out... i looked over forum.. forum has nothing about this at all for example: lets say the Warning bar near ur nick is the red bar(filled) and grey(empty as it is now) if slider is moved on 10 then program will wait for the warning (red) color to come down to 10(reading pixel in rectangle ofcourse,or maybe not..i dont know if pixel even has to be in this) or lower and the program will send mouse click with MouseGetPos or just send some button of keyboard like "g" or any other... Edited May 26, 2010 by TomaSzz Link to comment Share on other sites More sharing options...
Affe Posted May 26, 2010 Share Posted May 26, 2010 (edited) i just want to make a slider where u can choose from 1-100 in steps of 10 and pixel search red bar of 300,20 dimensions and send some keyboard button when that red bar is gone at 10-20-30-40-50-60-70-80-90 steps.. and i dont have a code at all only that there on top that i tryed... but its totaly wrong as posted below itEDIT: im going over all slider help files but still i cant figure anythig out... i looked over forum.. forum has nothing about this at allGoing by what you have written, I believe you are trying to do the following:1) Create a GUI with a slider that increments by steps of 10 -Question: Why do you need the slider? The slider is designed for user input. If you are trying to show progress, you can use ProgressOn() and ProgressSet() to display a popup window, or you can use GuiCtrlCreateProgress() to create one within a GUI. I could have mis-interpreted this, though.2) Read from a given area that has a red search bar with PixelSearch() -Is this something that is in a window on-screen? Edited May 26, 2010 by Affe [center][/center] Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 Going by what you have written, I believe you are trying to do the following:1) Create a GUI with a slider that increments by steps of 10 -Question: Why do you need the slider? The slider is designed for user input. If you are trying to show progress, you can use ProgressOn() and ProgressSet() to display a popup window, or you can use GuiCtrlCreateProgress() to create one within a GUI2) Read from a given area that has a red search bar with PixelSearch() -Is this something that is in a window on-screen?yep thats something i want ..man..its harder than i tought to explain ideas Link to comment Share on other sites More sharing options...
JohnOne Posted May 26, 2010 Share Posted May 26, 2010 this tutorial will show you how to make a slider AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 i know how to make slider read up on wat i wrote... Link to comment Share on other sites More sharing options...
JohnOne Posted May 26, 2010 Share Posted May 26, 2010 (edited) i know how to make slider read up on wat i wrote... You win, I give up.EDIT:TomaSzz Trying to make 2nd bot.. ^^So you have successfuly made 1 bot, but you dont know how to pixelsearch or know what a function is.You my friend stink of a wind up merchant. Edited May 26, 2010 by JohnOne AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 hmm i tot of other way how to make progra read every 10 steps like: If $slider = ;here what to put so that it would read if its 10 or 20 or 30 so on every 10 steps Link to comment Share on other sites More sharing options...
TomaSzz Posted May 26, 2010 Author Share Posted May 26, 2010 You win, I give up.EDIT:So you have successfuly made 1 bot, but you dont know how to pixelsearch or know what a function is.You my friend stink of a wind up merchant.lol? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now