Open Side Menu Go to the Top

06-23-2014 , 05:47 AM
Works perfectly, thanks!
ahk script for activating table with hover Quote
ahk script for activating table with hover
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
ahk script for activating table with hover
08-31-2015 , 01:09 PM
Bump used this to help with my remove chat script below (removes the chat box instantly when you open a new table and moves it off screen but brings it back to the table the mouse is hovering over when you press f1). If anyone can help me i can't get the chat to return without the timer sending it straight back off again. I want it to be ignored from the settimer if i press f1 for that particular table.

Spoiler:
#Persistent
setwindelay,-1
setkeydelay,-1
sendmode Event



settimer,check,100

return


check:
winget,list,list,ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
controlget,st,style,,PokerStarsChatEditorClass1,ah k_id%id%
if instr(st, "0x5")
controlsend,, ^{2},ahk_id%id%
chat%id%:=1
winmove, ahk_class PokerStarsTableHelperFrameClass,, 3000,3000
}
return


f1::
{
MouseGetPos, , , id, control
WinActivate, ahk_id %id%
send ^{2}
}
return

Last edited by Eu.Era; 08-31-2015 at 01:21 PM.
ahk script for activating table with hover Quote
08-31-2015 , 02:04 PM
You have to put a toggle in there and handle turning it on/off. So when you press F1, set some flag to true and put logic in your timer code to ignore processing if the flag is true. You will have to either use another hotkey to toggle it back or store timing values to do it automatically. It looks like you are already storing an array of chat windows, so utilize that or something like it. Change the chat item to global that can be referenced in your F1 hotkey. I can't see what you are using chat%id% for so I will just use another name in the example

Something like:

chatwindow <-initialize however you want as a global
#Persistent
setwindelay,-1
setkeydelay,-1
sendmode Event

settimer,check,100

return


check:
winget,list,list,ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
controlget,st,style,,PokerStarsChatEditorClass1,ah k_id%id%
if instr(st, "0x5")
controlsend,, ^{2},ahk_id%id%
chat%id%:=1<--you can probably reuse this
if (chatwindow%id%=0) <--not flagged as active, hide as usual
{
winmove, ahk_class PokerStarsTableHelperFrameClass,, 3000,3000
}

}
return



f1:: bring window in to view and flip toggle
{
MouseGetPos, , , id, control
WinActivate, ahk_id %id%
chatwindow%id%=1 <--flag as active or whatever
send ^{2}
}

+f1:: Shift+F1..flip toggle back.
{
MouseGetPos, , , id, control
WinActivate, ahk_id %id%
chatwindow%id%=0 <--flag as inactive or whatever
send ^{2}
}


That should get you started. I don;t know what your send {2} is doing so I can't fully comment on all of this.
ahk script for activating table with hover Quote
08-31-2015 , 03:11 PM
Hey thanks for your reply, that didnt work and tried settimer on/off and that didnt work either. I managed to get it working by just adding a toggled pause to the f1 command to pause the entire script. It will do but i wish there was a way of keeping the timer going and only exlcuding the table i press f1 on from the timer until i press f2. That way i have the chat box on my table but new tables will continue to have theres taken away. (btw ^{2} is what detaches the chat box in stars).

#Persistent
setwindelay,-1
setkeydelay,-1
sendmode Event

settimer,check, 100

return


check:
winget,list,list,ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
controlget,st,style,,PokerStarsChatEditorClass1,ah k_id%id%
if instr(st, "0x5")
controlsend,, ^{2},ahk_id%id%
{
winmove, ahk_class PokerStarsTableHelperFrameClass,, 3000,3000
}

}
return



f1::
{
MouseGetPos, , , id, control
WinActivate, ahk_id %id%
send ^{2}
Pause, toggle, 1
}
ahk script for activating table with hover Quote
09-01-2015 , 01:06 AM
You should be able to get it working without pausing the entire script. My psuedo code was just a swag while bored in a meeting, so just use it as an idea for a starting point. The problem here is probably that using a window handle as an array id may not work in AHK. Not sure about that. But as a quick and dirty, you could use a string and search/replace.

Something like this. F1 toggles the on/off, no need for F2. Stores all windows you have toggled to not move. Play around with it. I don't have Stars so I can't test exactly, but I have a version working with just regular windows. Shoe-horning it into your Stars script may have missed some syntax. The # are just wrappers around the IDs to insure I don't split a handle.

#Persistent
setwindelay,-1
setkeydelay,-1
sendmode Event

settimer,check, 100

return

check:
global DontMoveChat
winget,list,list,ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
controlget,st,style,,PokerStarsChatEditorClass1,ah k_id %id%
if instr(st, "0x5")
{
IfNotInString, DontMoveChat, #%id%# ;If Handle not in this list, then strip chat box and move
{
controlsend,, ^{2},ahk_id %id%
winmove, ahk_class PokerStarsTableHelperFrameClass,, 3000,3000
}
}
}
return


f1:: ;bring window in to view and flip toggle
{
global DontMoveChat
MouseGetPos, , , id, control
WinActivate, ahk_id %id%
;If the handle is in the search string, then turn it off and the timer will hide it
IfInString DontMoveChat, #%id%#
{
StringReplace DontMoveChat, DontMoveChat, #%id%#
}
else ;handle not in search string, so toggle it on and reattach
DontMoveChat = %DontMoveChat%#%id%#
send ^{2}
}
ahk script for activating table with hover Quote
09-01-2015 , 12:23 PM
You beautiful beautiful man it works perfectly!!! If i bring the chat back on a table and open a new table the new tables chat shoots off but the one i want on stays where it is.

Honestly i cant thank you enough.


Edit: I turned it into a loop instead of a timer and added these performance tweaks to the beginning and the tables shoot off instantly wheras before they would sit up to 5 seconds before they went.

#Persistent
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
Process, Priority, , H
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1

Loop
{
{
winmove, ahk_class PokerStarsTableHelperFrameClass,, 3000,3000
}
global DontMoveChat
winget,list,list,ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
controlget,st,style,,PokerStarsChatEditorClass1,ah k_id%id%
if instr(st, "0x5")
{
IfNotInString, DontMoveChat, #%id%# ;If Handle not in this list, then strip chat box and move
{
controlsend,, ^{2},ahk_id%id%
}
}
}
}
return

f1::
{
global DontMoveChat
MouseGetPos, , , id, control
WinActivate, ahk_id %id%
;If the handle is in the search string, then turn it off and the timer will hide it
IfInString DontMoveChat, #%id%#
{
StringReplace DontMoveChat, DontMoveChat, #%id%#
}
else ;handle not in search string, so toggle it on and reattach
DontMoveChat = %DontMoveChat%#%id%#
send ^{2}
}

Last edited by Eu.Era; 09-01-2015 at 12:49 PM.
ahk script for activating table with hover Quote
09-01-2015 , 02:23 PM
Happy to help.
ahk script for activating table with hover Quote
03-10-2016 , 06:59 AM
Hi, would it be possible to mod this script from Baobhan-Sith that hides the board to work with mouse over instead of hiding the board on all tables?


Code:
#NoEnv
#Persistent
#SingleInstance, force

;============================ CONFIG SECTION ======================================

SetTitleMatchMode, 2		;1=begin with 2=contain 3=exact match

Title = ahk_class PokerStarsTableFrameClass			;target windows title

GUIx = 235			;top left x coord of GUI rectangle (window relative)
GUIy = 190			;top left y coord of GUI rectangle (window relative)
GUIw = 190			;width of GUI rectangle
GUIh = 52			;height of GUI rectangle

Color = 1a1a1a			;GUI rectangle hex color

;==================================================================================

WinGet, table, list, %Title%
SetTimer, DrawGui, on

DrawGui:
	If table > 0
		{
		n+=1
		id:=table%n%
		WinGetPos, x, y,,, ahk_id%id%
		x := x+GUIx
		y := y+GUIy
		Gui %n%:-Caption +ToolWindow +AlwaysOnTop
		Gui, %n%:Color, %Color%
		Gui, %n%:Show, x%x% y%y% w%GUIw% h%GUIh% NA
		Show := 1
		if (n = table)
			{
			SetTimer, DrawGui, off
			SetTimer, Update, on
			}
		}
	else
		{
		WinWait, %Title%
		WinGet, table, list, %Title%
		}
return

Update:
	WinGet, count, count, %Title%
	If count = 0
		{
		n=0
		last := table + 1
		Loop, %last%
			{
			n+=1
			Gui, %n%:Hide
			}
		SetTimer, Update, off
		Show = 0
		}
	else, if (count != n)
		{
		n=0
		SetTimer, Update, off
		WinGet, table, list, %Title%
		SetTimer, DrawGui, on
		}
return

;================================ HOTKEYS =========================================

WheelUp::			;Shortkey to toggle on/off
	If Show = 1
		{
		SetTimer, DrawGui, off
		SetTimer, Update, off
		n=0
		Loop, %table%
			{
			n+=1
			Gui, %n%:Hide
			}
		Show = 0

		}	
	else
		{
		SetTimer, Update, off
		n=0
		WinGet, table, list, %Title%
		SetTimer, DrawGui, on
		}
return				

WheelDown::Reload			;Shortkey to reload the script

^Q::ExitApp			;CTRL+Q to close the script

Or this script from rezzo

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

F1::Progress, 1:B H100 W250 X240 Y180, Press F2 to close the window, , Left-Up
;Progress, 50 ; Set the position of the bar to 50%.
F2::Progress, 1:Off

F3::Progress, 2:B H100 W250 X940 Y180, Press F4 to close the window, , Right-Up
;Progress, 50 ; Set the position of the bar to 50%.
F4::Progress, 2:Off

F5::Progress, 3:B H100 W250 X240 Y710, Press F6 to close the window, , Left-Down
;Progress, 50 ; Set the position of the bar to 50%.
F6::Progress, 3:Off

F7::Progress, 4:B H100 W250 X940 Y710, Press F8 to close the window, , Right-Down
;Progress, 50 ; Set the position of the bar to 50%.
F8::Progress, 4:Off

Last edited by mrbambocha; 03-10-2016 at 07:17 AM.
ahk script for activating table with hover Quote
ahk script for activating table with hover
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
ahk script for activating table with hover

      
m