Sign in to follow this  
Followers 0
ikabob

a loop with a Loop?

8 posts in this topic

#1 ·  Posted (edited)

Global $RTimeIns,$ToolsIns
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
$MForm = GUICreate("Welcome", 231, 170, 2381, 203)
$ToolsIns = GUICtrlCreateInput("0", 48, 32, 121, 21)
$RTimeIns = GUICtrlCreateInput("0", 48, 80, 121, 21)
$OK1 = GUICtrlCreateButton("OK", 16, 112, 75, 25)
$Close1 = GUICtrlCreateButton("Close", 120, 112, 75, 25)
$ToolsLbl = GUICtrlCreateLabel("How Many Tips", 48, 16, 123, 17)
$RTimeLbl = GUICtrlCreateLabel("Run How Many Times", 48, 64, 85, 17)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
         Case $GUI_EVENT_CLOSE
            Exit
         Case $OK1
            RunScript()
         Case $Close1
            Exit
    EndSwitch
WEnd

Func RunScript()
   $loop = 0
   $tool = GUICtrlRead($ToolsIns)
   $RunTime = GUICtrlRead($RTimeIns)

   Do
      MouseClick("left",442,998,2)
      Send("New ROW1")
      Send("{ENTER}"
      Sleep(1000)
      $loop += 1
   Until $Loop = $RunTime
EndFunc

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
 EndFunc
 
 Func Terminate()
    Exit 0
EndFunc

ok so here is my script so far but I am having problems with my next challenge

line 37 is a start to a macro in another program, and as you can see it has a number attached to it(starts with 1 always) I would like that number to increment by one each time the loop runs. but not past the number set by $Toolins. once it hit the number matching I would like it to cycle back to one and count back up again till the Do loop finish's

any ideas cause I cant think of anything.

thanks a Tons in advanced.

Edited by ikabob

Share this post


Link to post
Share on other sites



ikabob, you seem to have missed the forum rules, which prohibit discussing game automation (mainly due to how pathetic and lame it is). Please see the link in the lower right hand corner of every page, and you'll see why you will get no help with this.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

not sure what you talking about this ant no game it an intriguing problem that I like to share and discus.

Share this post


Link to post
Share on other sites

LMAO, you seriously think people can't see that you changed your code in the first post?!


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

what? no I misspelled a word and wanted to correct it before any grammar Nazi got me. o:)

Share this post


Link to post
Share on other sites

Just so you'll know and the next 1000 people that do this know,  the mods can see every post and can see what has been deleted or changed if the post was edited.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

what? no I misspelled a word and wanted to correct it before any grammar Nazi got me. o:)

BS and you know it. last warning.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

ikabob,

And I have deleted the additional account you created immediately after this thread was closed - think yourself lucky that you did not post using it. One more trick like that and you will be removed permanently. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0