topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday May 8, 2024, 11:44 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: [1] 2 3 4 5 6 ... 10next
1
Skrommel's Software / About Hide desktop
« Last post by spazpunt on January 11, 2010, 02:58 AM »
Just wondering, is there a reason why instead of hiding , moving the desktop does not work?
   #Persistent
   SetWinDelay, -1
   SetTimer, WatchCursor, 100
return

WatchCursor:
   CoordMode, Mouse, Screen
   MouseGetPos, X, Y, id, control
   WinGetTitle, title, ahk_id %id%
   ; WinGetClass, class, ahk_id %id%
   ;tooltip %title% %x%
   If (title = "Program Manager") and ( X < 200 ) {
      SetTimer, WatchCursor, off
     
      x = 0
      loop, 200
      {
         x := x + 1
         ;tooltip WinMove+
          winmove, Program Manager, , %x%
      }
      sleep, 5000
   
      loop, 200
      {
         x := x - 1
         ;tooltip WinMove-
          winmove, Program Manager, , %x%
      }
     
      ;tooltip WinMove End
      SetTimer, WatchCursor, on
   }
return
2
Developer's Corner / Re: Autohotkey help
« Last post by spazpunt on August 02, 2009, 05:55 PM »
ok sir thank you managed to figure out the -1 thing b4 coming here :-[

3
Developer's Corner / Re: Autohotkey help
« Last post by spazpunt on August 02, 2009, 01:32 PM »
thank you so much for your kind response  8)
 :Thmbsup:

I really appreciate it

by the way althought I did put the line

WinGet, WinState, MinMax, ahk_id %this_id%
If ( WinState <> 0 )

at the beginning, it still renames all open windows even if they are minimised
4
Developer's Corner / Autohotkey help
« Last post by spazpunt on August 02, 2009, 10:03 AM »
Hi there :)

I have written a script which will basically number all open notepad windows or windows explorer windows as consecutive numbers depending on the order from topmost to bottommost, that is if it find a notepad it will be name 1 , another notepad 2, a window explorer 3

however i think that there is a problem with my ' if statement as it does not seem to recognise notepad or windows explorer could anyone please tell me what the problem is?

n=1
WinGet, id, list,,, Program Manager
Loop, %id%
{
this_id := id%A_Index%
WinGet, WinState, MinMax, ahk_id %this_id%
If ( WinState <> 0 )   
   
   titles := A_Index                        ; keep track of how many windows in list
   WinGetTitle, titles%A_Index%, ahk_id %this_id%    ; save original title
   titles%A_Index% .= "`n" this_id         ;   and its ahk_id
   
   

   WinGetTitle, this_title, ahk_id %this_id%
   
   WinGetClass, this_class, ahk_id %this_id%
   if this_class = Notepad,CabinetWClass
   {
      WinSetTitle,ahk_id %this_id%,, %n%
      n := n + 1
   }
   
   
   MsgBox, 4, , Visiting All Windows`n%a_index% of %id%`nahk_id %this_id%`nahk_class %this_class%`n%this_title%`n`nContinue?
   IfMsgBox, NO, break
}

msgbox, %titles%

; restore titles
Loop, %titles%
{
  StringSplit, windowInfo, titles%A_Index%, `n
  WinSetTitle, ahk_id %windowInfo2%,, %windowInfo1%
msgbox, %windowInfo2%   %windowInfo1%
}
Pages: [1] 2 3 4 5 6 ... 10next