AutoHotkey Community

It is currently May 27th, 2012, 12:45 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: March 23rd, 2010, 10:17 pm 
Offline

Joined: November 27th, 2006, 7:41 am
Posts: 222
Location: Queensland, Australia
I wrote a script that shows the window size as it's being resized, and it works on everything except Rivatuners graph... actually it DID work.. but now it doesn't, and I have no idea why.
Any clues?

It's been a long time since I wrote any ahk script, so feel free to refine anything stupid below too.. please.

Code:
; some stuff I apply to all of the multitude of other functions in this script
#NoEnv
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
#KeyHistory 100
SetTitleMatchMode, 2
SendMode Input   ;|Play|Event|InputThenPlay
SetKeyDelay, 30

;so rivatuner graph will be found..it DID work
DetectHiddenWindows, on


; the relevant bit
;~#LButton::
~!LButton::
 SetTimer, WinSize, 20
return

WinSize:
 GetKeyState, state, LButton, P
 if state = U
 { SetTimer, WinSize, Off
   ToolTip
 }
 else
; { GetKeyState, state, LWin, P
 { GetKeyState, state, Alt, P
   if state = U
   { SetTimer, WinSize, Off
     ToolTip
   }
   else
   {
     WinGetPos,,,Xs,Ys,A
;     WinGetActiveStats,foo,Xs,Ys,X,Y
     ToolTip,%Xs% x %Ys%
   }
 }
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2010, 12:14 am 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Have you changed the code?
Have you installed a new version of this Rivatuners thing?
Any other possible updates (OS, etc.)?

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2010, 1:51 am 
Offline

Joined: November 27th, 2006, 7:41 am
Posts: 222
Location: Queensland, Australia
What i mean is i had it working, and then just as I am happy with it and cleaning up/moving into my main (always running) script it just stops working on rivatuner. And yes, it works on any other window. Isolating the previous code back into a single ahk script with none others running gets the same results.

Theres somethig about the way rivatuner does its windows thats weird, i have the same problem with a window resizer that works on everything except rivatuners graph

DetectHiddenWindows, on seemed to fix it, but then it just stopped working with no apparent reason

Code:
#IfWinActive
ws_MinHeight = 512
OnExit, ExitSub
return  ; End of auto-execute section

#z::
WinGet, ws_ID, ID, A
Loop, Parse, ws_IDList, |
{
    IfEqual, A_LoopField, %ws_ID%
    {
        StringTrimRight, ws_Height, ws_Window%ws_ID%, 0
;        WinMove, ahk_id %ws_ID%,,,,, %ws_Height%
   WinMove, ahk_id %ws_ID%,,,,1024, 512
        StringReplace, ws_IDList, ws_IDList, |%ws_ID%
        return
    }
}
WinGetPos,,,, ws_Height, A
ws_Window%ws_ID% = %ws_Height%
;WinMove, ahk_id %ws_ID%,,,,, %ws_MinHeight%
;WinMove, ahk_id %ws_ID%,,,,1024, 1024
;WinMove, ahk_id %ws_ID%,,,,2048,1024
WinMove, ahk_id %ws_ID%,,,,1024, 1024
ws_IDList = %ws_IDList%|%ws_ID%
return

ExitSub:
Loop, Parse, ws_IDList, |
{
    if A_LoopField =  ; First field in list is normally blank.
        continue      ; So skip it.
    StringTrimRight, ws_Height, ws_Window%A_LoopField%, 0
    WinMove, ahk_id %A_LoopField%,,,,, %ws_Height%
}
ExitApp


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, jrav, MSN [Bot] and 24 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group