Jump to content

SomeBody22

Members
  • Posts

    17
  • Joined

  • Last visited

SomeBody22's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi, I'm coding a queue management. I need to bind the middle mouse button with the number generator function, ok it's easy. But, I need to remap or block the real function of the middle mouse button, because sometimes fails and clicks as a normal action... I will use other Windows functions at the same time, such as web browsing and if it fails, it will open new pages or close open tabs. #include <Misc.au3> While 1 If _IsPressed("04") Then $mPos = MouseGetPos() MouseMove(-1, -1, 0) MouseUp("middle") MouseMove($mPos[0], $mPos[1], 0) ToolTip(@SEC & @MSEC, Default, Default, "Last", 1, 1) ;TEST EndIf Sleep(10) WEnd
  2. Thanks again. I managed to solve using "GetKeyState" and "GetKeyNameText".
  3. Thank you very much, _WinAPI_SetWindowsHookEx is really better than _IsPressed in this case... But the dilemma remains, how to convert a Virtual-Key into a character ASCII(easily)?
  4. #include <Misc.au3> While 1 For $i = 0 To 190 $a_Result = _IsPressed(Hex($i)) If $a_Result = 1 Then If $i = 162 Then ConsoleWrite("LControl") ElseIf $i = 163 Then ConsoleWrite("RControl") ElseIf $i = 188 Then ConsoleWrite(","); 188 should be 44(,) ElseIf $i = 189 Then ConsoleWrite("-"); -(Hyphen Key) = BD(Hex) = 189(Dec on Extended Character ANSII) = 45(Dec on ASCII) ElseIf $i = 190 Then ConsoleWrite("."); .(Period Key) = BE(Hex) = 190(Dec on Extended Character ANSII) = 46(Dec on ASCII) Else ConsoleWrite("Pressed key: " & Chr($i) & @CRLF); ;[Continued ...] EndIf EndIf Next WEnd I need make a macro to do that, soon after pressing a key with punctuation he must recognize and record the key to later be used at the time of reproduction, currently, isn't recognizing properly the key pressed. And I don't want to bind the keys with the HotKeySet.
  5. Hello, Ineed a function like the one below(VB.net), which convertsextended characters to standard(printable Characters/Punctuation): CType(ConvertPunct(i), Char) Example: While 1 For $i = 150 To 190 If $i = 162 Then ConsoleWrite("LControl") ElseIf $i = 163 Then ConsoleWrite("RControl") ElseIf $i = 188 Then ConsoleWrite(","); 188 should be 44(,) ElseIf $i = 189 Then ConsoleWrite("-"); -(Hyphen Key) = BD(Hex) = 189(Dec on Extended Character ANSII) = 45(Dec on ASCII) ElseIf $i = 190 Then ConsoleWrite("."); .(Period Key) = BE(Hex) = 190(Dec on Extended Character ANSII) =46(Dec on ASCII) ;[Continued ...] EndIf Next Sleep(1) WEnd
  6. EXAMPLE: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 100, 100, 1, 1, $WS_POPUP) $Button1 = GUICtrlCreateButton("Button1", 1, 1, 100, 100) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 CreateButtonAndGraphic() EndSwitch WEnd Func CreateButtonAndGraphic() $Button1 = GUICtrlCreateButton("Button2", @DesktopWidth / 2, @DesktopHeight / 2, 100, 10) $Graphic1 = GUICtrlCreateGraphic(@DesktopWidth / 2, @DesktopHeight / 2, 500, 400) GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 6) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF0000) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 2, 2, 510, 398) EndFunc
  7. The error is simple, when you try to obfuscate a code that has "# include <IE.au3>" received this error. #AutoIt3Wrapper_Run_Obfuscator=y #include <IE.au3> $oIE_basic = _IE_Example ("basic") $oIE_form = _IE_Example ("form") $oIE_table = _IE_Example ("table") $oIE_frameset = _IE_Example ("frameset") $oIE_iframe = _IE_Example ("iframe") It's a bug?
  8. Same issue here, anyone have solution?
  9. I made some adjustments to the initial code and successfully I got what wanted. Thanks for the support BrewManNH!
  10. Thanks but still does not work.
  11. Well, thanks for the explanation, but it is really what I'm trying to do, he first looks around the desktop, if not find a sequence of pixels searched, he traces the beginning of search where the first pixel was found, but do not know where I am missing, since the research is not running in the correct area to redo the search ... Below is a second code that I tried to make it work properly, but without success: MsgBox(0, "", "Initializing", 5) $ColorLeft = 0x003366FF ;Blue $ColorCenter = 0x00FFFF00 ;Yellow $ColorRight = 0x00FFFFFF ;White $LeftPosition = 1 $ColorExists = 0 Do $First = PixelSearch($LeftPosition, 1, @DesktopWidth, @DesktopHeight, $ColorLeft) If IsArray($First) Then $Center = PixelGetColor($First[0] + 1, $First[1]) $Right = PixelGetColor($First[0] + 2, $First[1]) If $Center = $ColorCenter And $Right = $ColorRight Then $ColorExists = 1 MouseClick("left", $First[0], $First[1]) MsgBox(0, "", "Done") Else $LeftPosition = $First[0] + 1 ToolTip("Searching... [" & $LeftPosition & "]", 1, 1) EndIf EndIf Until $ColorExists <> 0
  12. Yes, I'm looking at the entire desktop. Because the idea is to identify exactly where the sequence of colors pixels to click it.
×
×
  • Create New...