Jump to content

Snippet Holder off screen.


Recommended Posts

Is there a way to winmove by process name, either that or can someone give me the name of the snipper window? lol I moved mine off screen. :)

Edit* oh wow lucky find found it

#include <Process.au3>

Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]", "")
$pid = WinGetProcess("[CLASS:Notepad]", "")
$name = _ProcessGetName($pid)

MsgBox(0, "Notepad - " & $pid, $name)

EDIT*

*sigh* didn't work.

Edited by IKilledBambi
Link to comment
Share on other sites

Is there a way to winmove by process name, either that or can someone give me the name of the snipper window? lol I moved mine off screen. :)

Edit* oh wow lucky find found it

#include <Process.au3>

Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]", "")
$pid = WinGetProcess("[CLASS:Notepad]", "")
$name = _ProcessGetName($pid)

MsgBox(0, "Notepad - " & $pid, $name)

EDIT*

*sigh* didn't work.

Something like this:

AutoItSetOption("WinTitleMatchMode",2)
HotKeySet("{ESC}","Quit")
Run("notepad.exe")
WinWait("Notepad")
While 1
$POS = WinGetPos("Notepad")
WinMove("Notepad","",Random(0,@DesktopWidth-$POS[2],1),Random(0,@DesktopHeight-$POS[3],1))
Sleep(3000)
WEnd
Func Quit()
    ProcessClose("notepad.exe")
    Exit
EndFunc

When the words fail... music speaks.

Link to comment
Share on other sites

:scratches head:

What is this snippets window you speak of? (I love finding new features)

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Link to comment
Share on other sites

It holds code snippets like, if you use a certain code a lot like this.

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

While 1
    Sleep(100)
WEnd

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc ;==>

You can add it to a snippet to just add whenever you like. I fixed it FINALLY by going to C:\Program Files\AutoIt3\SciTE\cSnippet\Snippets.ini and changing Dock=0 to Dock=1.

P.S. To get it go to tools > snippet holder(ctrl+alt+s)

Edited by IKilledBambi
Link to comment
Share on other sites

Cool, thanks, and glad you figured it out :)

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...