Hi all
before my "summer" question i need to write little prologue: i have 21 windows opened, on two monitors, and normally use 21 thread for make the some things on all windows (the same game with different account) ... some time i need to use only 12 account so i not load other tasks but hotkey are programmed for 21 so i need to "reload" my script after it finish it's work (or i have more "H" in the taskbar)
i think to make one little GUI with some Checkbox (with some "ON/OFF" global variable) for include/exclude specific thread, and add some IF before "calling thread function"
other way are to use #IfWinActive or "if WinExist" but some time i have windows open and not want to interact with it (exclude it from thread list)
do you have any further advice ?
Switch-box for exclude some thread ? Topic is solved
Re: Switch-box for exclude some thread ?
some example for future use (correct me if i make some mistake .. it's easy )
Now i have "big" problem, how to transfer checkbox-variable (Monete) into thread, i try many solution but not find the way
tray to "iniect" variable into function but it not work
Code: Select all
Gui, 2:New
Gui, 2:+AlwaysOnTop -SysMenu -Caption +Border
Gui, 2:Add, Button, x10 y10, START-EMU
Gui, 2:Add, Checkbox, x10 y45 Checked vServer, Disattiva per solo Taiwan
Gui, 2:Add, Checkbox, x10 y65 Checked vAiuti, Disattiva Castelli Aiuto
Gui, 2:Add, Checkbox, x10 y95 vMOnete, Aiuti solo Monete
Gui, 2:Show, X580 Y885 NoActivate, MACRO
Return
Code: Select all
!^F12:: ; just for test
Gui, 1:submit, nohide
IF(Server = 1)
{
msgbox Checkbox ATTIVO
}
IF(Server = 0)
{
msgbox Checkbox NON ATTIVO
}
Return
tray to "iniect" variable into function but it not work
Code: Select all
!^+a::
Gui, 1:submit, nohide
AiutoMulti("1", 0xBC2020, 0xBC2121, 606, 308, 0x231102, 537, 109, 0xB27823, 379, 375, 0xFFBE42, 613, 53, Monete)
...
...
Return
AiutoMulti(wname, color_0, color_0b, xClick_0, yClick_0, color_1, xClick_1, yClick_1, color_2, xClick_2, yClick_2, color_3, xClick_3, yClick_3, Monete)
{
return AhkThread("
(
; global Monete
CoordMode ,Pixel,Screen ;set this to use absolute coordinates and for specific thread
WinGetPos, X, Y, , , " wname "
...
...
PixelGetColor, Res, %xPixel_1%, %yPixel_1%, RGB
if(Res != " color_1 "){ ; checks barra aiuti se piena
Sleep 2000
; Gui, 1:submit, nohide
IF(" Monete " = 1) ; here need check for GUI-Checkbox variable - vMonete
{
MsgBox OK variabile
GoSub SoloMonete
}
; MsgBox " wname " piena
}
...
...
)")
}
Re: Switch-box for exclude some thread ?
You should read the checkbox from thread, otherwise you can transfer a value using thread.ahkassign("var",value).
Re: Switch-box for exclude some thread ? Topic is solved
i make some mistake with GUI number
so, this way work OK for use one or more GUI variable into multi thread function
so, this way work OK for use one or more GUI variable into multi thread function
Code: Select all
!^+a::
Gui, 2:submit, nohide
AiutoMulti("1", 0xBC2020, 0xBC2121, 606, 308, 0x231102, 537, 109, 0xB27823, 379, 375, 0xFFBE42, 613, 53, Monete) ; <- add variable-checkbox to function data
…
…
if (Server = 1) ; switch for use all thread or portion of it
{
AiutoMulti("8", 0xBC2020, 0xBC2121, 606, 308, 0x231102, 537, 109, 0xB27823, 379, 375, 0xFFBE42, 613, 53, Monete) ; <- add variable-checkbox to function data
AiutoMulti("9", 0xBC2020, 0xBC2121, 606, 308, 0x231102, 537, 109, 0xB27823, 379, 375, 0xFFBE42, 613, 53, Monete) ; <- add variable-checkbox to function data
}
Return
AiutoMulti(wname, color_0, color_0b, xClick_0, yClick_0, color_1, xClick_1, yClick_1, color_2, xClick_2, yClick_2, color_3, xClick_3, yClick_3, ckMonete) ; <- read variable-chekbox
{
return AhkThread("
(
...
...
IF(" ckMonete " = 1)
{
...
...
}
…
...
)")
}
Who is online
Users browsing this forum: No registered users and 28 guests