c7aesa7r

Remove loop

8 posts in this topic

#1 ·  Posted

Quote

$key = "{ENTER}"

;get a list if window handles that match the text
$winList = WinList("")

;run until killed/paused in the notification area
While 1
   ;loop through the windows
   For $i = 0 to $winList[0][0]

      $title = $winList[$i][0]
      $handle = $winList[$i][1]
      $controlid = ""
      $text = ""
      ControlSend($handle,$text,$controlid,$key)


   Next
WEnd

Can someone help me finish editing this script, i only need remove the loop, i need it run just one time :'(((

Share this post


Link to post
Share on other sites



#2 ·  Posted

Or just close the script after run 1x

Share this post


Link to post
Share on other sites

#3 ·  Posted

I cannot edit my posts why?

Quote

$key = "{ENTER}"

$winList = WinList("PXG Client")

      $title = $winList
      $handle = $winList
      $controlid = ""
      $text = ""
      ControlSend($handle,$text,$controlid,$key)

I tried this way but the script even dont open 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I'm sorry you're experiencing problems.  You will be able to edit posts after you have created more posts.  You need a post count of 5 for example but it may be greater than 5.

To run the nested For loop one time and then end script; remove the While 1 and the WEnd lines from the original script in post 1.

Edited by Xandy

Share this post


Link to post
Share on other sites

#5 ·  Posted

Thankyou it worked, and how i do to close the script after run one time? Also is possible send ENTER 2x?

I tried  $key = "{ENTER}" ,"{ENTER"} dont worked

Share this post


Link to post
Share on other sites

#7 ·  Posted

Thankyou again, i read the link and got it working, one more doubt.

I have a window tha have [ ] in her title, and when i try declare $winlist = Winlist("[Proxifier]")

ofline.png

How i declare a window with [] in title?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

see Array here

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

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