Jump to content

mar3011

Members
  • Posts

    12
  • Joined

  • Last visited

About mar3011

  • Birthday 02/26/1999

Profile Information

  • Location
    Poland,Warsaw

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

mar3011's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I have a problem, I want the function :send key in loop to be activated when the checkbox is selected and when the check box is turned off, the function turns off. I tried and only one checkbox works after selecting the second checkbox is flashing and cant be unchecked. I have looked through the entire forum and there is no such topic anywhere code #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <TrayConstants.au3> #include <MsgBoxConstants.au3> #include<Date.au3> #include <DateTimeConstants.au3> #include <InetConstants.au3> #include <WinAPIFiles.au3> #RequireAdmin Global $Paused HotKeySet("{f9}", "TogglePause") Opt("GUIOnEventMode", 1) $Form1 = GUICreate("test)", 269, 165, 228, 373) Local $Checkbox1 = GUICtrlCreateCheckbox("", 240, 24, 17, 17) GUICtrlSetOnEvent($Checkbox1,"test1") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 240, 48, 17, 17) GUICtrlSetOnEvent($Checkbox2,"test2") #EndRegion ### END Koda GUI section ### GUISetState(@SW_SHOW) global $start1 = 0 Lglobal $start2=0 While 1 if GUICtrlRead($Checkbox2)= 1 Then Send( "{f1}" ) EndIf if GUICtrlRead($Checkbox1)= 1 Then Send( "{f2}" ) EndIf WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused = SCRIPT IS NOT RUNNING = you wont get another message if you dont unpause it"',0,0) WEnd ToolTip("") EndFunc Func test1() $start1 =1 EndFunc Func test2() $start2=1 EndFunc Func _Exit() Exit EndFunc
  2. hi I have a problem with the IP address field I want to enter the indicated page on the Internet after entering the IP address, but it does not work pops up all the time, " Make sure that the web address http://0.0.0.0 is correct. "From the input field everything works, but I want to write in this field only the IP address, I used to enter the ES_Numbers style it works, but I can only write the number, dots do not work.I have read the help file about  _GUICtrlIpAddress_Create but it did not help me,anyone can help? here is code #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <GuiIPAddress.au3> #Region ### START Koda GUI section ### Form=C:\Users\Marcin\Desktop\Projekty Oficjalne\AutoLogin\AutoLog.kxf $Form1 = GUICreate("Internet Login", 542, 181, 339, 261) $Group3 = GUICtrlCreateGroup("IP ADDRESS E.G..192.168.0.1", 16, 40, 161, 49) $IpAddress = _GUICtrlIpAddress_Create($Form1, 24, 56, 145, 21) $gPin = GUICtrlCreateInput("", 216, 56, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $gHaslo = GUICtrlCreateInput("", 216, 112, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $Btn_Zaloguj = GUICtrlCreateButton("Log In", 216, 152, 97, 25) $Group1 = GUICtrlCreateGroup("Your Pin", 208, 40, 121, 49) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Your Password", 208, 96, 121, 49) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $oIE = _IECreateEmbedded() $object=GUICtrlCreateObj($oIE,336, 8, 201, 169) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() if $msg=-3 Then Exit If $msg=$Btn_Zaloguj Then Btn_Zaloguj() WEnd Func Btn_Zaloguj() $read1=GuiCtrlread($IpAddress) _IENavigate($oIE,$read1) EndFunc
  3.   Global $sInput = InputBox("Set Hotkey", "Enter the letter you want to use as a Hotkey!") HotKeySet($sInput, "_Hotkey") HotKeySet("{Esc}", "_Exit") While 1 Sleep(10) WEnd Func _Hotkey() MsgBox(0, "", "Hotkey pressed") EndFunc Func _Exit() Exit EndFunc I found what I was looking for but now I want it to work and open something like the Notepad example ,after press any keys.
  4. just i want write to inputbox example key "A" click on button Ok then press on keyboard key "A" and next automatically run the notepade is is possible to do?? i want to run notepade after set key "A" in the inputbox field clicking on button Ok and press "A" on keyboard then run it notepad now you guys understand what i want to do? but it must be for random all keys in keyboard
  5. i want something like this but for open notepad while you set keys to inputbox then you press on keyboard key that you selected #include <GUIConstantsEx.au3> #include <WinAPI.au3> #Include <WindowsConstants.au3> ;HotKeySet('{CAPSLOCK}', '_ExcludeHotkey') ;HotKeySEt('{NUMLOCK}', '_ExcludeHotkey') Global Const $HKM_SETHOTKEY = $WM_USER + 1 Global Const $HKM_GETHOTKEY = $WM_USER + 2 Global Const $HKM_SETRULES = $WM_USER + 3 Global Const $HOTKEYF_ALT = 0x04 Global Const $HOTKEYF_CONTROL = 0x02 Global Const $HOTKEYF_EXT = 0x80; Extended key Global Const $HOTKEYF_SHIFT = 0x01 ; invalid key combinations Global Const $HKCOMB_A = 0x8; ALT Global Const $HKCOMB_C = 0x4; CTRL Global Const $HKCOMB_CA = 0x40; CTRL+ALT Global Const $HKCOMB_NONE = 0x1; Unmodified keys Global Const $HKCOMB_S = 0x2; SHIFT Global Const $HKCOMB_SA = 0x20; SHIFT+ALT Global Const $HKCOMB_SC = 0x10; SHIFT+CTRL Global Const $HKCOMB_SCA = 0x80; SHIFT+CTRL+ALT Global $HotkeyMap Dim $HotkeyMap[67][2] $HotkeyMap[0][0] = "{CAPSLOCK}" $HotkeyMap[0][1] = 20 $HotkeyMap[1][0] = "{NUMPAD0}" $HotkeyMap[1][1] = 96 $HotkeyMap[2][0] = "{NUMPAD1}" $HotkeyMap[2][1] = 97 $HotkeyMap[3][0] = "{NUMPAD2}" $HotkeyMap[3][1] = 98 $HotkeyMap[4][0] = "{NUMPAD3}" $HotkeyMap[4][1] = 99 $HotkeyMap[5][0] = "{NUMPAD4}" $HotkeyMap[5][1] = 100 $HotkeyMap[6][0] = "{NUMPAD6}" $HotkeyMap[6][1] = 101 $HotkeyMap[7][0] = "{NUMPAD7}" $HotkeyMap[7][1] = 102 $HotkeyMap[8][0] = "{NUMPAD8}" $HotkeyMap[8][1] = 103 $HotkeyMap[9][0] = "{NUMPAD8}" $HotkeyMap[9][1] = 104 $HotkeyMap[10][0] = "{NUMPAD9}" $HotkeyMap[10][1] = 105 $HotkeyMap[11][0] = "{NUMPADMULT}" $HotkeyMap[11][1] = 106 $HotkeyMap[12][0] = "{NUMPADADD}" $HotkeyMap[12][1] = 107 $HotkeyMap[13][0] = "{NUMPADSUB}" $HotkeyMap[13][1] = 109 $HotkeyMap[14][0] = "{NUMPADDOT}" $HotkeyMap[14][1] = 110 $HotkeyMap[15][0] = "{NUMPADDIV}" $HotkeyMap[15][1] = 111 $HotkeyMap[16][0] = "{F1}" $HotkeyMap[16][1] = 112 $HotkeyMap[17][0] = "{F2}" $HotkeyMap[17][1] = 113 $HotkeyMap[18][0] = "{F3}" $HotkeyMap[18][1] = 114 $HotkeyMap[19][0] = "{F4}" $HotkeyMap[19][1] = 115 $HotkeyMap[20][0] = "{F5}" $HotkeyMap[20][1] = 116 $HotkeyMap[21][0] = "{F6}" $HotkeyMap[21][1] = 117 $HotkeyMap[22][0] = "{F7}" $HotkeyMap[22][1] = 118 $HotkeyMap[23][0] = "{F8}" $HotkeyMap[23][1] = 119 $HotkeyMap[24][0] = "{F9}" $HotkeyMap[24][1] = 120 $HotkeyMap[25][0] = "{F10}" $HotkeyMap[25][1] = 121 $HotkeyMap[26][0] = "{F11}" $HotkeyMap[26][1] = 122 $HotkeyMap[27][0] = "{F12}" $HotkeyMap[27][1] = 123 $HotkeyMap[28][0] = "{SCROLLLOCK}" $HotkeyMap[28][1] = 145 ;even though the buttons below don't have AU3 tags, they have different ASCII code $HotkeyMap[29][0] = ";" $HotkeyMap[29][1] = 186 $HotkeyMap[30][0] = "=" $HotkeyMap[30][1] = 187 $HotkeyMap[31][0] = "-" $HotkeyMap[31][1] = 189 $HotkeyMap[32][0] = "." $HotkeyMap[32][1] = 190 $HotkeyMap[33][0] = "/" $HotkeyMap[33][1] = 191 $HotkeyMap[34][0] = "`" $HotkeyMap[34][1] = 192 $HotkeyMap[35][0] = "[" $HotkeyMap[35][1] = 219 $HotkeyMap[36][0] = "\" $HotkeyMap[36][1] = 220 $HotkeyMap[37][0] = "]" $HotkeyMap[37][1] = 221 $HotkeyMap[38][0] = "'" $HotkeyMap[38][1] = 222 $HotkeyMap[39][0] = "{HOME}" $HotkeyMap[39][1] = 2084 $HotkeyMap[40][0] = "{END}" $HotkeyMap[40][1] = 2083 $HotkeyMap[41][0] = "{INSERT}" $HotkeyMap[41][1] = 2093 $HotkeyMap[42][0] = "{PGUP}" $HotkeyMap[42][1] = 2081 $HotkeyMap[43][0] = "{PGDN}" $HotkeyMap[43][1] = 2082 $HotkeyMap[44][0] = "{LEFT}" $HotkeyMap[44][1] = 2085 $HotkeyMap[45][0] = "{RIGHT}" $HotkeyMap[45][1] = 2087 $HotkeyMap[46][0] = "{UP}" $HotkeyMap[46][1] = 2086 $HotkeyMap[47][0] = "{DOWN}" $HotkeyMap[47][1] = 2088 $HotkeyMap[48][0] = "{NUMLOCK}" $HotkeyMap[48][1] = 2192 $HotkeyMap[49][0] = "," $HotkeyMap[49][1] = 188 ; the following keys are either not currently possible to set, or they are duplicates depends on other system conditions, such as when NumLock is off $HotkeyMap[50][0] = "{SCROLLLOCK}" $HotkeyMap[50][1] = 3 $HotkeyMap[51][0] = "{BACKSPACE}" $HotkeyMap[51][1] = 8 $HotkeyMap[52][0] = "{TAB}" $HotkeyMap[52][1] = 9 $HotkeyMap[53][0] = "{NUMPAD5}" $HotkeyMap[53][1] = 12 $HotkeyMap[54][0] = "{ENTER}" $HotkeyMap[54][1] = 13 $HotkeyMap[55][0] = "{SPACE}" $HotkeyMap[55][1] = 32 $HotkeyMap[56][0] = "{NUMPAD9}" $HotkeyMap[56][1] = 33 $HotkeyMap[57][0] = "{NUMPAD3}" $HotkeyMap[57][1] = 34 $HotkeyMap[58][0] = "{NUMPAD1}" $HotkeyMap[58][1] = 35 $HotkeyMap[59][0] = "{NUMPAD7}" $HotkeyMap[59][1] = 36 $HotkeyMap[60][0] = "{NUMPAD4}" $HotkeyMap[60][1] = 37 $HotkeyMap[61][0] = "{NUMPAD8}" $HotkeyMap[61][1] = 38 $HotkeyMap[62][0] = "{NUMPAD6}" $HotkeyMap[62][1] = 39 $HotkeyMap[63][0] = "{NUMPAD2}" $HotkeyMap[63][1] = 40 $HotkeyMap[64][0] = "{NUMPAD0}" $HotkeyMap[64][1] = 45 $HotkeyMap[65][0] = "{NUMPADDOT}" $HotkeyMap[65][1] = 46 $HotkeyMap[66][0] = "\" $HotkeyMap[66][1] = 226 $gui_Main = GUICreate('Get Hotkey', 220, 90) $bt = GUICtrlCreateButton('See Value', 10, 50, 200, 30); GUICtrlSetState(-1, $GUI_DEFBUTTON) $hWnd = _WinAPI_CreateWindowEx (0, 'msctls_hotkey32', '', BitOR($WS_CHILD, $WS_VISIBLE), 10, 10, 200, 25, $gui_Main) _SendMessage($hWnd, $HKM_SETRULES, _ BitOR($HKCOMB_NONE, $HKCOMB_S), _ ; invalid key combinations BitOR(BitShift($HOTKEYF_ALT, -16), BitAND(0, 0xFFFF))); add ALT to invalid entries ;Generate random hotkey $key = "" If Random(0,1,1) Then $key &= "^" If Random(0,1,1) Then $key &= "!" If Random(0,1,1) Then $key &= "+" If Random(0,1,1) Then $key &= $HotkeyMap[Random(0,UBound($HotkeyMap, 1)-1, 1)][0] Else $key &= Chr(Random(Asc("a"), Asc("z"), 1)) ;letter case is irrelevant EndIf GUISetState() MsgBox(0, "Generated default hotkey", $key) _SendMessage($hWnd, $HKM_SETHOTKEY, HotkeyConvert($key, 1)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $bt $i_HotKey = _SendMessage($hWnd, $HKM_GETHOTKEY) Msgbox(0, "Converted hotkey to AU3 format", HotkeyConvert($i_Hotkey)) ; If $i_Hotkey = 20 or $i_Hotkey = 144 then ;huh? What's wrong with CapsLock and F3? ; _SendMessage($hWnd, $HKM_SETHOTKEY) ; EndIf EndSwitch WEnd _WinAPI_DestroyWindow ($hWnd) Exit Func HotkeyConvert($hotkey, $type = 0) Local $key = "" Local $n = UBound($HotkeyMap, 1)-1 Local $bin = 0 If $type Then ;reverse convert AU3 to binary If StringInStr($hotkey, "+") Then $bin = BitOr($bin, $HOTKEYF_SHIFT) If StringInStr($hotkey, "^") Then $bin = BitOr($bin, $HOTKEYF_CONTROL) If StringInStr($hotkey, "!") Then $bin = BitOr($bin, $HOTKEYF_ALT) $hotkey = StringReplace(StringReplace(StringReplace($hotkey, "!", ""), "^", ""), "+", "") ;Removing any Shift/Ctrl/Alt For $i = 0 To $n Step 1 If $HotkeyMap[$i][0] = $hotkey Then $key = $HotkeyMap[$i][1] ExitLoop EndIf Next If NOT $key Then $key = Asc(StringUpper($hotkey)) EndIf $bin = "0x" & Hex(BitOr(0x100 * $bin, $key)) Return $bin EndIf $n_Flag = BitShift($hotkey, 8); high byte $i_HotKey = BitAND($hotkey, 0x8FF); low byte this will include Home, Insert, etc without Shift, Ctrl and Alt $hotkeyAssignment = '' If BitAND($n_Flag, $HOTKEYF_SHIFT) Then $hotkeyAssignment &= '+' If BitAND($n_Flag, $HOTKEYF_CONTROL) Then $hotkeyAssignment &= '^' If BitAND($n_Flag, $HOTKEYF_ALT) Then $hotkeyAssignment &= '!' For $i = 0 TO $n Step 1 If $HotkeyMap[$i][1] = $i_Hotkey Then $key = $HotkeyMap[$i][0] ExitLoop EndIf Next If NOT $key Then $i_HotKey = BitAND($hotkey, 0xFF) $key = StringLower(Chr($i_Hotkey)) ;any letter type of keys should be lower case to avoid confusion as capital "A" = Shift + a EndIf $hotkeyAssignment &= $key Return $hotkeyAssignment EndFunc Func _ExcludeHotkey() _SendMessage(_WinAPI_GetFocus(), $HKM_SETHOTKEY) EndFunc
  6. i want set random Hotkey at inputbox example alt+A while you press this key you open Notepad and for all random set keys you will open notepad .
  7. hello, I want to set in the inputbox field random key from the keyboard to which the function will be assigned, for example F4 function start notepad ALT + A function start notepad for one function. Thank you for any help.
  8. Hey, I have a problem I tried to look for it but it didn't solve the problem, I can't add an icon to the exe, I already know there were such topics I tried to all add exclusion C: \ Users \ Marcin \ AppData \ Local \ AutoIt v3 \ aut472.tm.exe to antivirus but after compilation, the name of the file changes, I uninstalled the anti-virus, but it didn't works, except that when I add the example icons from AutoIT it works, I downloaded icons using Firefox Developer Edition also don't works, just the downloaded graphics don't works also. Is there any solution to this problem?
  9. Hi, I'm just getting started in AutoIt so I'm a noob I have this problem: I want my script to run after setting the chosen name "......" in the Nickname of the game unfortunately -snip--
×
×
  • Create New...