AutoHotkey Community

It is currently May 27th, 2012, 10:22 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: July 25th, 2007, 1:15 pm 
I want to use "if conditions" once.Sometimes i use them more than one so my processes are duplicated.How can i adjust the code to warn me with a msgbox if i use the condition more than one.
Code:
InputBox, SearchWords, Referansı Giriniz.
if searchwords =
{
sleep,300
MouseClick, left,  318,  158
Send, {TAB}{TAB}{TAB}%valor%{TAB}%valor%{ENTER}
MouseClick, left,  852,  177
sleep,1000
loop,10
{
mouseclick,left,913,321
}
MouseClick, left,  993,  277
}
if searchwords =0016754
{
MouseClick, left,  310,  155
send,{SPACE}7313299{tab}36{enter}
msgbox,next
MouseClick, left,  286,  315
MouseClick, left,  952,  717
msgbox,next
mouseclick,left,659,147
MouseClick, left,  705,  195
send,60543
MouseClick, left,  781,  353
send, EUR{TAB}{TAB}{ENTER}
MouseClick, left,  595,  393
if color=0xE7EFEF
{
mouseclick,left,969,716
}
}
if searchwords =0076294
{
MouseClick, left,  310,  155
send,{SPACE}9454901{tab}36{enter}
msgbox,next
MouseClick, left,  286,  315
MouseClick, left,  952,  717
msgbox,next
Mouseclick,left,725,148
MouseClick, left,  705,  195
send,40815
MouseClick, left,  781,  353
send,EUR MASRAFII{TAB}{TAB}{ENTER}
MouseClick, left,  595,  393


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2007, 1:44 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
Wrong forum

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2007, 2:06 pm 
Sorry i missed.Could any moderator move this?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2007, 3:27 pm 
Offline

Joined: November 26th, 2005, 10:35 pm
Posts: 196
If I understand correctly, you want something like this:

Code:
#SingleInstance, Force
Var = 1

Loop, 3
   {
   If Var > 0
        {
        Occurrences += 1
        If Occurrences >= 2
             MsgBox, This condition has been met %Occurrences% times.
        }
   }


This will notify you with a message box if the condition has been met more than once. Since the code loops three times, that means two message boxes pop up. If you want to stop operation (or have the option to, via msgbox) after it's been used more than once, you can use IfMsgBox.

_________________
http://thedbdclan.com/public/pingrep


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 25th, 2007, 8:25 pm 
thanks a lot that is what exactly i want.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, chaosad, robotkoer and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group