Draygoes Posted April 16, 2022 Share Posted April 16, 2022 (edited) This doesn't work. Do Sleep(100) Until WinActive( "TheNuggetQueen - Discord" ) Everyone here is going "well duh ", but I mean, why can't that work? Is there any other type of loop that I could use in one line that would work here? Btw, I want to replace sleep with "WinActivate" to loop until window is at forefront.(EDIT: I'm not automating anything other than Discord! Goodness that came out wrong the first time lmao. I'm writing a love message sender) Edited April 16, 2022 by Draygoes Clarification!! Fixed Function JLogan3o13 1 Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 16, 2022 Developers Share Posted April 16, 2022 (edited) What exactly is wrong putting it on 3/4 lines? 😕 Edited April 16, 2022 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Draygoes Posted April 16, 2022 Author Share Posted April 16, 2022 Oh, nothing. And putting it on three lines is what i've done. I'm curious more than anything. I think it would be neat looking and it's always nice to be able to take a couple of lines off of a single task. Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Nine Posted April 16, 2022 Share Posted April 16, 2022 Put all your 3-4 liners into UDF-like collection of functions and call them from a single line (don't forget the #include ) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Werty Posted April 16, 2022 Share Posted April 16, 2022 Two lines using While... While (Not Winactive( "TheNuggetQueen - Discord" ) And Sleep(100)) WEnd Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
rudi Posted April 19, 2022 Share Posted April 19, 2022 What about simply using the function WinWait() ? Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now