Sign in to follow this  
Followers 0
kcd-clan

i Need this simple program.

11 posts in this topic




I want to goto this program runing click this location then another and wait and repeat that.

And thats all.

<{POST_SNAPBACK}>

Look in the help file for the following:

Loop Statements

WinActivate

MouseClick

Sleep

Hope this helps,

JPC :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Type? I think you mean 'move and click' so slow and are referring to the mouse. Look at the 'Speed' Parametre.

MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

Speed:
[optional] the speed to move the mouse in the range 1 (fastest) to 100 (slowest). A speed of 0 will move the mouse instantly. Default speed is 10.
Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Add this to your script. 1 is possibly the fastest send speed.

Opt("SendKeyDelay", 1)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

it will do it 1 time and thats it

Do

Send("{F10}")

Sleep(2000)

MouseClick("left", 200, 635, 2 ,1);Click Schematic

Sleep(1500)

MouseClick("left", 300, 250, 2 ,1);Add Resourses

MouseClick("left", 300, 250, 2 ,1);Add Resourses

MouseClick("left", 300, 250, 2 ,1);Add Resourses

MouseClick("left", 300, 250, 2 ,1);Add Resourses

MouseClick("left", 300, 250, 2 ,1);Add Resourses

Sleep(500)

MouseClick("left", 780, 635, 1 ,1);click next

Sleep(1500)

MouseClick("left", 690, 620, 1 ,1);click next

MouseClick("left", 770, 590, 1 ,1);click next

Sleep(3000)

Send("{F11}")

Sleep(2000)

MouseClick("left", 200, 635, 2 ,1)

Sleep(1500)

MouseClick("left", 300, 250, 2 ,1)

MouseClick("left", 300, 250, 2 ,1)

MouseClick("left", 300, 250, 2 ,1)

MouseClick("left", 300, 250, 2 ,1)

MouseClick("left", 300, 250, 2 ,1)

Sleep(500)

MouseClick("left", 780, 635, 1 ,1)

Sleep(1500)

MouseClick("left", 690, 620, 1 ,1)

MouseClick("left", 770, 590, 1 ,1)

Sleep(3000)

Send("{F12}")

Sleep(2000)

MouseClick("left", 200, 635, 2 ,1)

Sleep(1500)

MouseClick("left", 300, 250, 2 ,1)

MouseClick("left", 300, 250, 2 ,1)

MouseClick("left", 300, 250, 2 ,1)

MouseClick("left", 300, 250, 2 ,1)

MouseClick("left", 300, 250, 2 ,1)

Sleep(500)

MouseClick("left", 780, 635, 1 ,1)

Sleep(1500)

MouseClick("left", 690, 620, 1 ,1)

MouseClick("left", 770, 590, 1 ,1)

Sleep(3000)

Until Send ("{END}")

Edited by kcd-clan

Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I fail to see your problem of not typing something out fast enough? You arn't typing anything just sending one F Key at a time which should be sent instantanously.

If your talking about MouseClicking and moving "1" is not the fastest "0" is. If so change the lines with "1" in them.

eg

MouseClick("left", 770, 590, 1 ,1)

to

MouseClick("left", 770, 590, 1 ,0)
Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Yes thats because you cant make something stop Unilt "Send". The syntax is incorrect, try this. I also tidy'd up your code abit.

HotKeySet ("{END}", "_Exit")

$Click = 0

While 1
   Send("{F10}")
   Sleep(2000)
   MouseClick("left", 200, 635, 2 ,1);Click Schematic
   Sleep(1500)
   Do
      MouseClick("left", 300, 250, 2 ,1);Add Resourses
      $Click = $Click + 1
   Until $Click = 5
   Sleep(500)
   MouseClick("left", 780, 635, 1 ,1);click next
   Sleep(1500)
   _Click_Next()
   Sleep(3000)
   Send("{F11}")
   Sleep(2000)
   MouseClick("left", 200, 635, 2 ,1)
   Sleep(1500)
   $Click = 0
   Do
      MouseClick("left", 300, 250, 2 ,1);Add Resourses
      $Click = $Click + 1
   Until $Click = 5
   Sleep(500)
   MouseClick("left", 780, 635, 1 ,1)
   Sleep(1500)
   _Click_Next()
   Sleep(3000)
   Send("{F12}")
   Sleep(2000)
   MouseClick("left", 200, 635, 2 ,1)
   Sleep(1500)
   $Click = 0
   Do
      MouseClick("left", 300, 250, 2 ,1);Add Resourses
      $Click = $Click + 1
   Until $Click = 5
   Sleep(500)
   MouseClick("left", 780, 635, 1 ,1)
   Sleep(1500)
   _Click_Next()
   Sleep(3000)
Wend

Func _Exit()
   Exit
EndFunc

Func _Click_Next()
   MouseClick("left", 690, 620, 1 ,1)
   MouseClick("left", 770, 590, 1 ,1)
EndFunc
Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Hello @ll,

I have one question about sendkeys:

Here is my short program, but If I start it so, the word "Test" will be write any time long and not one time. Can somebody help me?

#include <GUIConstants.au3>

Global $msg, $button
GUICreate("My GUI"); will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW)   ; will display an empty dialog box

$button = GUICtrlCreateButton("Excel öffnen",100,100)

While 1
$msg = GUIGetMsg ()
   If $msg = $button Then Run(@ComSpec & " /c start " & "C:\test.xls")
       
    Send("Test")
          
Wend

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