Jump to content
Sign in to follow this  
caramen

script with gui help ty :)

Recommended Posts

caramen

While (1)

un ()

WEnd

Pause ()
Exite ()

While (1)

sleep(10)

WEnd

Func un ()

If GUICtrlRead($Check1) = $GUI_CHECKED Then DHT() EndIf
If GUICtrlRead($Check2) = $GUI_CHECKED Then DHTA EndIf
If GUICtrlRead($Check3) = $GUI_CHECKED Then DHF() EndIf
If GUICtrlRead($Check4) = $GUI_CHECKED Then WDD() EndIf

EndFunc

Func DHT ()



EndFunc

Func DHTA ()



EndFunc

My question now :) i got that script and my gui edited in my gui i whant my user select 1 or 2 or 3 or more /20 parameter with one or more checkbox, can me multiple selection,

how can i do to do a sequence with that ?

i will try to explain what i whant with keystroke sequence

Gui with checked or not box and what they do

checkbox A (emulate keystroke A) (checked)

checkbox B (emulate keystroke B') (no checked)

checkbox C (emulate keystroke C) (checked)

checkbox D (emulate keystroke D) (checked)

checkbox E (emulate keystroke E) (checked)

checkbox F (emulate keystroke F) (no checked)

checkbox G (emulate keystroke G)(no checked)

so with my code as i show it i whant my script emulate the key ACDE

does i have to do all combinaison of case possible :/ ?

or is there a way to do that ??

Edited by caramen

IUIAutomation From Junkew || WebDriver From Danp2 || And Water's UDF in the Quote|| >>HIt The Thanks Button.<<

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
GordonFreeman

You can post the all code. I get it. But I do not know what you want to do with it. I think have other simpler means

Share this post


Link to post
Share on other sites
caramen

#include 
#include 

Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)

HotKeySet("{PAUSE}", "Pause")
Global $Paused
HotKeySet("{F12}", "Exite")

Dim $var
Dim $p
Dim $DHT
Dim $DHTA
Dim $DHF
Dim $WDD

$DHT = 0
$DHTA = 0
$DHF = 0
$WDD = 0

MsgBox ( 0, "Thank you", "Edited by Caramen#2426 feel free to add me :).")

$SettingsFile = @SCRIPTDIR & 'Settings.ini'

$LogAccount =IniRead ($SettingsFile, 'Account', 'Account', "ERROR")
$LogPass = IniRead ($SettingsFile, 'Account', 'PassW', "ERROR")

$GW = IniRead ($SettingsFile, 'GUILD WAR EXECUTABLE', 'GW', "ERROR")

$DeleyA = IniRead ($SettingsFile, 'Deley', 'DeleyA', "ERROR")

$Deley0 = IniRead ($SettingsFile, 'Deley', 'Deley0', "ERROR")
$Deley1 = IniRead ($SettingsFile, 'Deley', 'Deley1', "ERROR")
$Deley2 = IniRead ($SettingsFile, 'Deley', 'Deley2', "ERROR")
$Deley3 = IniRead ($SettingsFile, 'Deley', 'Deley3', "ERROR")
$Deley4 = IniRead ($SettingsFile, 'Deley', 'Deley4', "ERROR")
$Deley5 = IniRead ($SettingsFile, 'Deley', 'Deley5', "ERROR")


GUICreate("Witch buff do you whant", 500, 500)
GUICtrlCreateLabel("------Demmon Hunter------" ,20, 10 )
$check1 = GUICtrlCreateCheckbox("Demon hunter trap (1) ", 30, 40)
$check2 = GUICtrlCreateCheckbox("Demon hunter trap (6second) (1)", 30, 70)
$check3 = GUICtrlCreateCheckbox("Demon hunter Familiar (4)", 30, 100)
GUICtrlCreateLabel("------Witch doctor------" ,20, 130 )
$check4 = GUICtrlCreateCheckbox("Witch doctor Dogs (1)" , 30, 160)
$check5 = GUICtrlCreateCheckbox("Witch doctor Golem (2)", 30, 190)
$check6 = GUICtrlCreateCheckbox("Witch doctor Kurast (3)", 30, 220)
GUICtrlCreateLabel("------Barb------" ,20, 250 )
$check7 = GUICtrlCreateCheckbox("Barb battle cry (4)", 30, 280)
GUICtrlCreateLabel("------Monk------" ,20, 310 )
$check8 = GUICtrlCreateCheckbox("Monk aura (4)", 30, 340)
GUICtrlCreateLabel("------Sorce------" ,20, 370 )
$check9 = GUICtrlCreateCheckbox("Sorce shield (4)", 30, 400)
GUISetState(@SW_SHOW)
Sleep(1000)
WinMove("Witch buff do you whant", "", 0, 0, 500, 500)


GUICreate("Choose your buff", 200, 500)
GUICtrlCreateLabel("<---- Select your buff here" ,10, 30 )
GUICtrlCreateLabel("<---- Select your buff here" ,10, 90)
GUICtrlCreateLabel("<---- Select your buff here" ,10, 150 )
GUICtrlCreateLabel("<---- Select your buff here" ,10, 210)
GUICtrlCreateLabel("<---- Select your buff here" ,10, 270 )
GUISetState(@SW_SHOW)
WinMove("Choose your buff", "", 510, 0, 200, 500)
Sleep(1000)
MsgBox ( 0, "OK", "ONLY push ok if you have selected your buff!!")

;~ Sleep(1000)
;~ GUICreate("Pause", 70, 70)
;~ GUICtrlCreateButton("pause" ,100, 100 )
;~ GUISetState(@SW_SHOW)
;~ WinMove("Pause", "", 0, 0, 70, 70)
;~ Sleep(5000)
;~ WinSetOnTop("Pause", "", 1)
;~ WinActivate( "Diablo III")
;~ GUICreate("Pause", 200, 200)
;~ WinMove("Witch buff do you whant", "", 0, 0, 500, 500)

Sleep(20000)


While (1)

un ()

WEnd

Pause ()
Exite ()

While (1)

sleep(10)

WEnd

Func un ()

If GUICtrlRead($Check1) = $GUI_CHECKED Then $DHT = 1 Else $DHT = 0 EndIf
If GUICtrlRead($Check2) = $GUI_CHECKED Then $DHTA = 1 Else $DHTA = 0 EndIf
If GUICtrlRead($Check3) = $GUI_CHECKED Then $DHF = 1 Else $DHF = 0 EndIf
If GUICtrlRead($Check4) = $GUI_CHECKED Then $WDD = 1 Else $WDD = 0 EndIf

If $DHT = 1 Then
Sleep(Random(8300, 8500))
Send("{&}")


EndFunc

Func DHT ()

Sleep(Random(8200, 8300))
Send("{&}")

EndFunc

Func DHTA ()



EndFunc

Func Exite ()
Exit
EndFunc

Func Pause()
$Paused = NOT $Paused
While $Paused
Sleep (500)
WEnd
EndFunc; => Pause()
;~ Func logoffon ()
;~ EndFunc


IUIAutomation From Junkew || WebDriver From Danp2 || And Water's UDF in the Quote|| >>HIt The Thanks Button.<<

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Rutger83

Which buff did you want? ;)

Share this post


Link to post
Share on other sites
GordonFreeman

Try it. but my Code is noob. have to improve, It's just a way

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>

$Form = GUICreate("Form1", 350, 450, 192, 124)
GUICtrlCreateGroup("", 8, 0, 325, 369)
GUICtrlCreateLabel("Use F2", 8, 376, 70, 28)

Global $ArrayChecked[21] = [20]
Global $letters[21] = ["A","B","C","D","E","F","G","H","I","J","L","M","N","O","P","Q","R","S","T","U"]
Global $CheckBoxes[21] = [20]
$x = 24
$y = 35

For $i = 1 To 20
If $i = 11 Then
$x += 160
$y = 385
EndIf
$CheckBoxes[$i] = GUICtrlCreateCheckbox("CheckBox " & $letters[$i - 1], $x, 16 + $i * 35 - $y, 145, 25)
GUICtrlSetFont(-1, 11, 800, 0, "Calibri")
Next
GUISetState(@SW_SHOW)



While 1
If _IsPressed("71") Then
For $i = 1 to $ArrayChecked[0]
$ArrayChecked[$i] = ""
Next

For $i = 1 to $CheckBoxes[0]
If GUICtrlRead($CheckBoxes[$i]) = 1 Then
$ArrayChecked[$i] = $letters[$i - 1]
EndIf
Next

For $i = 1 to $CheckBoxes[0]
If StringLen($ArrayChecked[$i]) = 1 Then
Send($ArrayChecked[$i])
Sleep(100) ;delay
EndIf
Next
EndIf

$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit


EndSwitch
WEnd
Edited by GordonFreeman

Share this post


Link to post
Share on other sites
caramen

i tryed your script he is damn nice and gived me a good idea for a future other programms

but it s not exactly what i whant :(

in my logic :

Gui with checked or not box and what they do

checkbox A (emulate keystroke A) (checked)

checkbox B (emulate keystroke B') (no checked)

checkbox C (emulate keystroke C) (checked)

checkbox D (emulate keystroke D) (checked)

checkbox E (emulate keystroke E) (checked)

checkbox F (emulate keystroke F) (no checked)

checkbox G (emulate keystroke G)(no checked)

each emulated keystroke is representing a little code like that one

[color=#00ff00]//Checkbox one checken then implemente this code[/color]
Func Demon1 ()
Sleep(Random(8300, 8500))
Send("{&}")
EndFunc
[color=#00ff00]//Checkbox 2 checken then implemente this code[/color]
Func Demon2 ()
Sleep(Random(6300, 6500))
Send("{&}")
EndFunc

my problem is how implemente these code if they have diferente timing in the same sequence without wait two time the sleep


IUIAutomation From Junkew || WebDriver From Danp2 || And Water's UDF in the Quote|| >>HIt The Thanks Button.<<

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×