Sign in to follow this  
Followers 0
p666

Help for beginner

7 posts in this topic

Hey everyone ,

I start to write a simple script that aims to repeat the same action in one application!

WinWaitActive("БИЗНЕС НАВИГАТОР")

Send("{Tab}{Tab}{Tab}{Enter}")

WinWaitActive("БИЗНЕС НАВИГАТОР")

Send("{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}")

send("{down}")

WinWaitActive("БИЗНЕС НАВИГАТОР")

Send("{Tab}{Tab}{Enter}")

WinWaitActive("БИЗНЕС НАВИГАТОР")

Send("{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}")

send("{down}")

WinWaitActive("БИЗНЕС НАВИГАТОР")

Send("{Tab}{Tab}{Enter}")

WinWaitActive("БИЗНЕС НАВИГАТОР")

Send("{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}")

send("{down}")

Is there a way to repeat such actions by any function , or I just need to copy the desired rows of recurrence in the script?

WinWaitActive("БИЗНЕС НАВИГАТОР")

Send("{Tab}{Tab}{Enter}")

WinWaitActive("БИЗНЕС НАВИГАТОР")

Send("{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}")

send("{down}")

Regards

Share this post


Link to post
Share on other sites



Hi, you can use several kinds of loops.

For example, run the same code 100 times

For $i=1 to 100 
 ; place your code here
Next

or an infinite loop

While 1 
 ; place your code here
Wend

Best regards,

Marc


It's my job to comfort the disturbed and to disturb the comfortable.
My Projects: Profiler, MakeSFX, UserInfo

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

This may work...

Global $Name1 = "БИЗНЕС НАВИГАТОР"
For $i = 1 to 5
 _Run
Next

Func _Run()
WinWaitActive($Name1)
Send("{Tab}{Tab}{Enter}")
WinWaitActive($Name1)
Send("{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}")
send("{down}")
EndFunc ;==>_Run

jfcby

Edited by jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Share this post


Link to post
Share on other sites

This may work...

Global $Name1 = "БИЗНЕС НАВИГАТОР"
For $i = 1 to 5
 _Run
Next

Func _Run()
WinWaitActive($Name1)
Send("{Tab}{Tab}{Enter}")
WinWaitActive($Name1)
Send("{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}")
send("{down}")
EndFunc ;==>_Run

jfcby

Share this post


Link to post
Share on other sites

Thenks jfcby this work fine for me!

Regards

Share this post


Link to post
Share on other sites

If "Buisness Navigator" is some kind of software, i would advice you to check ControlSend and similar functions.

Share this post


Link to post
Share on other sites

If "Buisness Navigator" is some kind of software, i would advice you to check ControlSend and similar functions.

Yes Makaule

Buisness Navigator is Bulgarian financial software!

I was read in Help about "ControlSend" function , but I can not understand your idea!

Either way things work successfully with the proposal and gave me jfcby !!

Thanks a lot!

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