Jump to content

Search the Community

Showing results for tags 'cursor'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 13 results

  1. Hey, all. I've been looking for a way to change cursor colour but not the cursor itself. I've been looking for a couple hours now and can't find anything. I also don't even know where to start, if anyone has any tips or examples please comment them. Thanks
  2. Hey Community, I was changing around my color scheme manually for syntax highlighting. I really enjoy using a dark background color. However, this seems to be problematic because my blinking cursor is also very dark. Is there a setting in the ScITE config where I can manipulate the blinking cursor to be a different color like "white" so it is easy to spot when coding. The closest thing I found was "Caret Line Color", but this just changes the line highlight. Your help is greatly appreciated!!
  3. Tell me, please, how to set / change the cursor over RichEdit (created with _GUICtrlRichEdit_Create)?
  4. Two questions... When presenting a form containing a richedit control, is there any way to make the displayed text, within said richedit control, non-selectable? In addition, is there any way to hide the vertical line cursor, within said richedit control? Thanx.
  5. When I set the busy cursor on the main gui, it returns to a normal cursor when hovering over any of the controls on the gui window. This behavior happens regardless of whether I set the 'override' parameter to 1 or to 0. Here is my test code: #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_UseX64=N Opt("GUICloseOnESC", 1) ; ESC closes GUI? (0 = no, 1 = yes) Opt("GUIOnEventMode", 1) ; Change to OnEvent mode Opt('MustDeclareVars', 1) OnAutoItExitRegister("Event_GUIClose") #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $hMainWin, $statusID, $cnt = 0 _Main() Func _Main() Local $msg $hMainWin = GUICreate("cursor test", 250, 200, -1, -1) GUICtrlCreateListView("ABCdef", 10, 10, 100, 100) GUICtrlCreateButton("override = 1", 130, 10, 100, 25) GUICtrlSetOnEvent(-1, "handle_SetCur_1_btn") GUICtrlCreateButton("override = 0", 130, 50, 100, 25) GUICtrlSetOnEvent(-1, "handle_SetCur_0_btn") $statusID = GUICtrlCreateLabel("", 10, 120, 200, 20) GUICtrlSetBkColor(-1, 0xFFFF00) GUISetOnEvent($GUI_EVENT_CLOSE, 'Event_GUIClose') GUISetState() ; Make everything visible While (1) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect Sleep(125) WEnd EndFunc ;==>_Main Func Event_GUIClose() Exit EndFunc ;==>Event_GUIClose Func handle_SetCur_1_btn() If (Mod($cnt, 2)) Then setIT(15, 1) Else setIT(2, 1) EndIf $cnt += 1 EndFunc ;==>handle_SetCur_1_btn Func handle_SetCur_0_btn() If (Mod($cnt, 2)) Then setIT(15, 0) Else setIT(2, 0) EndIf $cnt += 1 EndFunc ;==>handle_SetCur_0_btn Func setIT($cursorID, $override) Local $str GUISetCursor($cursorID, $override, $hMainWin) $str = "Set " & (($cursorID = 2) ? " normal" : " busy") & " cursor." $str &= " (override = " & $override & ")" ConsoleWrite("+++: " & $str & @CRLF) GUICtrlSetData($statusID, $str) EndFunc ;==>setIT
  6. Hello, I want that when mouse cursor is in GUI, cursor would hide, and when cursor is outside GUI it would appear again. (Sorry for my bad English)
  7. Hello to all autoit coders, I'm not a pro dev but I've recently made a few automatisation programs. I met a program SplashTop which allows user to control their PC from android phone and play games through it (e.g. Skyrim or any other game with first person camera). The program is perfect but it's totally missing one thing - mouse move. It only allows mouse click&drag as user moves their finger on the touch screen.I was thinking about using physical phone keyboard <>^(and down) to mouse move but not many ppl have got qwerty phones such motorola droid 4 or similar and I can transfer <>^ into mousemove. The question is if any of you know a way to disable mouse click&drag and convert it into mousemove. Thanks for responses, I'm sorry but I can't make paragraphs on mobile version
  8. Hello I'm trying to set a new cursor instead of the default cursors of the system ex: make the default arrow cursor is busy until a program starts I've searched the forum and got this code Global Const $OCR_APPSTARTING = 32650 Global Const $OCR_NORMAL = 32512 Global Const $OCR_CROSS = 32515 Global Const $OCR_HAND = 32649 Global Const $OCR_IBEAM = 32513 Global Const $OCR_NO = 32648 Global Const $OCR_SIZEALL = 32646 Global Const $OCR_SIZENESW = 32643 Global Const $OCR_SIZENS = 32645 Global Const $OCR_SIZENWSE = 32642 Global Const $OCR_SIZEWE = 32644 Global Const $OCR_UP = 32516 Global Const $OCR_WAIT = 32514 _SetCursor(@WindowsDir&"\cursors\aero_working.ani", $OCR_NORMAL) Func _SetCursor($s_file, $i_cursor) Local $newhcurs $newhcurs = DllCall("user32.dll", "int", "LoadCursorFromFile", "str", $s_file) DllCall("user32.dll", "int", "SetSystemCursor", "int", $newhcurs[0], "int", $i_cursor) DllCall("user32.dll", "int", "DestroyCursor", "int", $newhcurs[0]) EndFunc this code is good in changing the cursor from an external file but can I change the cursor without using external files ( as in win XP there're no files for default cursors) ex: change default system Normal arrow to AppStarting arrow directly Thank you and Any help is very appreciated,
  9. Hi, the Help file has a nice example for setting cursors, but what I am looking for is an explanation - what does each type of cursor represent? Is #2 'ready' and #1 'working', #15 'busy'? I tried msdn too, but that has lots of blah on how to set cursors in C++ --- no definitive cursor list...
  10. This script is intended to allow the user to move their mouse to the edge of their screen and have the mouse appear to the opposite end. When the user drags the mouse to the edge of a monitor there is a 300 millisecond delay before the mouse will wrap. This will give the user some time to change their mind and give some time for the taskbar to open if the user has it set to autohide. When the user drags a window or selection rectangle to the edge of a monitor the user will have 700 milliseconds to take advantage of the Windows 7 Snap feature. If the user has not moved the mouse from the edge within that time then the window will move to the opposite edge. When the user holds down the mouse wheel the wrap effect is disabled. Tested on Windows 7 x64 with two monitors placed horizontally. Updates: MouseWrap.zip - Source works on latest AutoIt beta. Includes an exe. downloads: 197
  11. So i borrowed this code and made some adjustments to fit my needs. Basically i am wanting to mimic the main windows cursor and create a duplicate cursor at a different location of the monitor. So on code line 18, "ToolTip("^", $mouse[0] + GUICtrlRead($xDistanceInput) - 100, $mouse[1] + GUICtrlRead($yDistanceInput))" i want that to be a transparent PNG image. That image will be a cursor image #include <Misc.au3> HotKeySet("{ESC}", "_exit") $mouse = MouseGetPos() $xDistanceInput = GUICtrlCreateInput("", 128, 0, 49, 21) $yDistanceInput = GUICtrlCreateInput("", 128, 24, 49, 21) _secondMouse() While 1 Sleep(10) WEnd Func _secondMouse() While 1 Sleep(5) $mouse = MouseGetPos() ToolTip("^", $mouse[0] + GUICtrlRead($xDistanceInput) - 100, $mouse[1] + GUICtrlRead($yDistanceInput)) If _IsPressed("01") Then _mouseClick() If _IsPressed("78") Then ;HotKeySet{F9} ToolTip("") ExitLoop EndIf WEnd EndFunc ;==>_secondMouse Func _mouseClick() ToolTip("") MouseUp("left") MouseMove($mouse[0] + GUICtrlRead($xDistanceInput), $mouse[1] + GUICtrlRead($yDistanceInput), 0) MouseDown("left") Sleep(50) MouseUp("left") MouseMove($mouse[0], $mouse[1], 0) ToolTip("^", $mouse[0] + GUICtrlRead($xDistanceInput), $mouse[1] + GUICtrlRead($yDistanceInput)) EndFunc ;==>_mouseClick Func _exit() Exit EndFunc ;==>_exit
  12. I have found 2 different pieces of code that i am trying to sort of combine into one, and would like some assistance. Basically i want the yellow circle that is in the first code snippet to be transparent and able to be clicked through like the piece in the second code snippet Snippet 1: #include <GUIConstants.au3> #include <WindowsConstants.au3> Global Const $pi = 3.14159265358979 HotKeySet("{ESC}", "_Bye") $iCircleR = 20; <=== Edit this for different circle radius (in pixels) $iCircleD = $iCircleR * 2 Global $radius = 0 ;radius of movement of the blob mouse cursor to centre of circle blob Global $angle = 4 Global $incr = 3 $pt = MouseGetPos() $GUI = GUICreate("test", $iCircleD, $iCircleD, $pt[0] - $iCircleR, $pt[1] - $iCircleR, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0xFFFF99) $a = _CreateRoundRectRgn(0, 0, $iCircleD, $iCircleD, $iCircleD, $iCircleD) _SetWindowRgn($GUI, $a) GUISetState() GUISetState(@SW_DISABLE) While 1 Sleep(10) $pt = MouseGetPos() If Not @error Then MoveBlob($pt) WEnd Func _CreateRoundRectRgn($l, $t, $w, $h, $e1, $e2) $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $l, "long", $t, "long", $l + $w, "long", $t + $h, "long", $e1, "long", $e2) Return $ret[0] EndFunc ;==>_CreateRoundRectRgn Func _CombineRgn(ByRef $rgn1, ByRef $rgn2) DllCall("gdi32.dll", "long", "CombineRgn", "long", $rgn1, "long", $rgn1, "long", $rgn2, "int", 3) EndFunc ;==>_CombineRgn Func _SetWindowRgn($h_win, $rgn) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1) EndFunc ;==>_SetWindowRgn Func _bye() Exit EndFunc ;==>_bye Func Setangle() $angle = Mod($angle + $Incr,360);degrees EndFunc Func MoveBlob($mousePos) $radAng = $angle * $pi/180 Local $x = $mousepos[0] + $radius * Cos($radAng) - $iCircleR Local $y = $mousepos[1] + $radius * Sin($radAng) - $iCircleR WinMove($GUI, "", $x,$y) EndFunc Snippet 2: #include <GuiEdit.au3> #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> Opt('MustDeclareVars', 1) Local $hGUI, $hEdit, $hChild, $hLabel ; Create GUI $hGUI = GUICreate("", 400, 300, -1, -1) $hChild = GUICreate("Notepad", 400, 300, -1, -1, Default, BitOR($WS_EX_MDICHILD, $WS_EX_LAYERED, $WS_EX_TOPMOST), $hGUI) $hEdit = _GUICtrlEdit_Create($hChild, "", 2, 2, 394, 268, -1) GUICtrlSetBkColor ($hEdit, 0xFFFFFF) _WinAPI_SetLayeredWindowAttributes($hChild, 0xFFFFFF, 255) $hLabel = GUICtrlCreateLabel("", 0, 0, 400, 300, -1, $GUI_WS_EX_PARENTDRAG) GUISetState() _GUICtrlEdit_SetText($hEdit, "This is a test" & @CRLF & "Another Lne") ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete()
  13. Is there a way to change to a custom cursor? I found some examples that work with GUI but can not find anything that changes the cursor on my desktop without a gui.
×
×
  • Create New...