Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Software (http://archives1.twoplustwo.com/forumdisplay.php?f=47)
-   -   PP AHK request (http://archives1.twoplustwo.com/showthread.php?t=479088)

GLmaestro 08-16-2007 01:34 PM

PP AHK request
 
Hey guys,

It would be extremely useful to have an AHK script that prevents the party tables from resizing. I think we all sometimes accidently click the right border of a table, making it resize a little bit leading to even more party lag.

Does anyone know of a script that can lock the tables making them non-resizable?

Thanks

Roland 08-16-2007 01:49 PM

Re: PP AHK request
 
<font class="small">Code:</font><hr /><pre> #NoEnv
#Persistent
#SingleInstance force

WinWait PartyPoker.com:
WinGet, pid, pid

SetTimer, timer, 1000
return

timer:
WinGet, list, list, Good Luck ahk_pid%pid%
Loop % list {
WinGet, style, style, % "ahk_id" list%a_index%
if (Style &amp; 0x40000)
WinSet, Style, -0x40000, % "ahk_id" list%a_index%
}
return </pre><hr />

GLmaestro 08-16-2007 07:46 PM

Re: PP AHK request
 
Thanks a lot, it doesn't seem to work though.

I have the latest AHK, what can be wrong?

Roland 08-16-2007 07:52 PM

Re: PP AHK request
 
Are you running Party with Swedish language setting or something? It looks for the 'Good Luck' in the window title.

GLmaestro 08-16-2007 07:54 PM

Re: PP AHK request
 
No, it's english and says Good Luck

Roland 08-16-2007 07:58 PM

Re: PP AHK request
 
Stick this in the loop:

msgbox % (Style &amp; 0x40000)

after the WinGet command.

It should say either 1 or 0...

GLmaestro 08-16-2007 08:00 PM

Re: PP AHK request
 
so the complete code should be like this:

#NoEnv
#Persistent
#SingleInstance force

WinWait PartyPoker.com:
WinGet, pid, pid

msgbox % (Style &amp; 0x40000)

SetTimer, timer, 1000
return

timer:
WinGet, list, list, Good Luck ahk_pid%pid%
Loop % list {
WinGet, style, style, % "ahk_id" list%a_index%
if (Style &amp; 0x40000)
WinSet, Style, -0x40000, % "ahk_id" list%a_index%
}
return




I tried this but it doesn't work [img]/images/graemlins/frown.gif[/img]

Roland 08-16-2007 08:01 PM

Re: PP AHK request
 
No, after the, err, third WinGet command. Inside the loop.

GLmaestro 08-16-2007 08:01 PM

Re: PP AHK request
 
Do i need Roland's functions for this to work btw?

Roland 08-16-2007 08:02 PM

Re: PP AHK request
 
No.

GLmaestro 08-16-2007 08:06 PM

Re: PP AHK request
 
Sry for being a n00b, but i cant get it working

I've tried to put msgbox % (Style &amp; 0x40000) inside the loop and the window is still resizable

Roland 08-16-2007 08:07 PM

Re: PP AHK request
 
So no msgbox pops up when you run it?

GLmaestro 08-16-2007 08:11 PM

Re: PP AHK request
 
A message box popped up, but it was empty (just had an OK button)

Roland 08-16-2007 08:27 PM

Re: PP AHK request
 
Try this, let me know what the msgboxes said.

#NoEnv
#Persistent
#SingleInstance force

WinWait PartyPoker.com:
WinGet, pid, pid

msgbox Party found

SetTimer, timer, 1000
return

timer:
WinGet, list, list, Good Luck ahk_pid%pid%
ifEqual, list, 0, msgbox No tables detected!
Loop % list {
WinGet, style, style, % "ahk_id" list%a_index%
msgbox % (Style &amp; 0x40000)
if (Style &amp; 0x40000)
WinSet, Style, -0x40000, % "ahk_id" list%a_index%
}
return

GLmaestro 08-16-2007 08:29 PM

Re: PP AHK request
 
It says No tables detected

Roland 08-16-2007 08:39 PM

Re: PP AHK request
 
I am sorry... my Party was set to German and I couldn't figure out how to change it, so I couldn't test... meh. Anyhow, this should work now:

#NoEnv
#Persistent
#SingleInstance force

SetTitleMatchMode 2

WinWait PartyPoker.com:
WinGet, pid, pid

SetTimer, timer, 1000
return

timer:
WinGet, list, list, Good Luck ahk_pid%pid%
Loop % list {
WinGet, style, style, % "ahk_id" list%a_index%
if (Style &amp; 0x40000)
WinSet, Style, -0x40000, % "ahk_id" list%a_index%
}
return

GLmaestro 08-16-2007 08:40 PM

Re: PP AHK request
 
omg it works, thank you so much this is awesome!

gball 08-17-2007 08:26 AM

Re: PP AHK request
 
Excellent!


All times are GMT -4. The time now is 06:06 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.