Jump to content

[Solved] Hide Mouse Pointer & Change Input Style


 Share

Recommended Posts

Two Questions here

I was searching the forum for a way to hide the mouse pointer, and i only came across 2 answers. One is to make a GUI, with GUISetCusor(16) and the second is the code below.

Const $OCR_NORMAL = 32512
Local $HCURSOR = 0

;Needs to have a transprant cursor in the same directory as the running script.
$CURSOR = @ScriptDir & ".\point.cur"
$HCURSOR = DllCall("user32.dll", "int", "LoadCursorFromFileA", "str", $CURSOR)
DllCall("user32.dll", "int", "SetSystemCursor", "int", $HCURSOR[0], "int", $OCR_NORMAL)

This only changes the main cursor to invisible, if the mouse goes over text you then see Roman numeral I or if a application is loading it switches to the spinning circle.

So would anyone know how to change to code to affect all cursors ?

Second Question.

#include <EditConstants.au3>

$hWnd = GUICreate("Gui Style", 260, 100)
$Style = GUICtrlCreateButton("Set Style", 45, 50, 150, 20)
$Input = GUICtrlCreateInput("", 0, 0, 50, 50)

GUISetState()

While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $Style
GUICtrlSetStyle($ES_PASSWORD,"", $Input)
Case Else
EndSwitch
WEnd

Is there any way of changing a Input boxes style, to password "so every time you time into it it shows *" after a input box has been made ? In the code above i tryed setstyle but it didn't work.

Edited by IanN1990
Link to comment
Share on other sites

This will create an input control that will display the password character.

#include <EditConstants.au3>

GUICtrlCreateInput("", 10, 35, 300, 20, BitOR($ES_PASSWORD, $GUI_SS_DEFAULT_EDIT))

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Though i admit i didn't know about the $GUI_SS_DEFAULT_EDIT, i thought $ES_PASSWORD was the only way i go. In my code i need the input box to be able to display characters normally as it has many functions and only for a short period is it used for a password. So in the example i was looking for a way to change the style of a active / created input box to only display password letters.

Input box - Use it normally - click button - input box is now in password mode.

At the momemnet the only way i can think of doing it is deleting / destroying the input box. Generating a new one with the password styles and once the password is entered, destroying it again to make a standard input.

Edited by IanN1990
Link to comment
Share on other sites

Then you need to use GUICtrlSetStyle, and not GUISetStyle.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I changed the example in the original post to use GUICtrlSetStyle instead of GUISetStyle. I Write some stuff, click the button but the input box doesn't show password characters. Is the example or syntax wrong ?

Secondly i have been diving deeper into the hide mouse pointer.

http://www.thebitguru.com/articles/14-Programmatically+Changing+Windows+Mouse+Cursors

In this post he talks about the cursors are stored in Registy, so i made two reg files.

Default

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERControl PanelCursors]
"Arrow"=hex(2):00,00
"Help"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,
00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,00,
72,00,6f,00,5f,00,68,00,65,00,6c,00,70,00,73,00,65,00,6c,00,5f,00,78,00,6c,
00,2e,00,63,00,75,00,72,00,00,00
"Hand"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,
00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,00,
72,00,6f,00,5f,00,6c,00,69,00,6e,00,6b,00,5f,00,78,00,6c,00,2e,00,63,00,75,
00,72,00,00,00
"AppStarting"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,
00,74,00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,
65,00,72,00,6f,00,5f,00,77,00,6f,00,72,00,6b,00,69,00,6e,00,67,00,5f,00,78,
00,6c,00,2e,00,61,00,6e,00,69,00,00,00
"Wait"=hex(2):00,00
"NWPen"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,
00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,00,
72,00,6f,00,5f,00,70,00,65,00,6e,00,5f,00,78,00,6c,00,2e,00,63,00,75,00,72,
00,00,00
"No"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,
25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,00,72,
00,6f,00,5f,00,75,00,6e,00,61,00,76,00,61,00,69,00,6c,00,5f,00,78,00,6c,00,
2e,00,63,00,75,00,72,00,00,00
"SizeNS"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,
00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,00,
72,00,6f,00,5f,00,6e,00,73,00,5f,00,78,00,6c,00,2e,00,63,00,75,00,72,00,00,
00
"SizeWE"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,
00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,00,
72,00,6f,00,5f,00,65,00,77,00,5f,00,78,00,6c,00,2e,00,63,00,75,00,72,00,00,
00
"SizeNWSE"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,
74,00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,
00,72,00,6f,00,5f,00,6e,00,77,00,73,00,65,00,5f,00,78,00,6c,00,2e,00,63,00,
75,00,72,00,00,00
"SizeNESW"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,
74,00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,
00,72,00,6f,00,5f,00,6e,00,65,00,73,00,77,00,5f,00,78,00,6c,00,2e,00,63,00,
75,00,72,00,00,00
"SizeAll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,
74,00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,
00,72,00,6f,00,5f,00,6d,00,6f,00,76,00,65,00,5f,00,78,00,6c,00,2e,00,63,00,
75,00,72,00,00,00
"UpArrow"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,
74,00,25,00,5c,00,63,00,75,00,72,00,73,00,6f,00,72,00,73,00,5c,00,61,00,65,
00,72,00,6f,00,5f,00,75,00,70,00,5f,00,78,00,6c,00,2e,00,63,00,75,00,72,00,
00,00
@="Windows Aero (extra large)"
"Scheme Source"=dword:00000002
"Crosshair"=hex(2):00,00
"IBeam"=hex(2):00,00

My Custom Mouse Remover

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERControl PanelCursors]
"Arrow"=hex(2):00,00
"Help"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,
00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,00,
6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,00,
00
"Hand"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,
00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,00,
6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,00,
00
"AppStarting"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,
00,4c,00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,
69,00,6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,
00,00,00
"Wait"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,
00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,00,
6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,00,
00
"NWPen"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,
00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,00,
6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,00,
00
"No"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,00,
45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,00,6e,
00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,00,00
"SizeNS"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,
00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,00,
6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,00,
00
"SizeWE"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,
00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,00,
6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,00,
00
"SizeNWSE"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,
4c,00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,
00,6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,
00,00
"SizeNESW"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,
4c,00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,
00,6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,
00,00
"SizeAll"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,
4c,00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,
00,6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,
00,00
"UpArrow"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,
4c,00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,
00,6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,
00,00
@="Windows Aero (extra large)"
"Scheme Source"=dword:00000002
"Crosshair"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,
4c,00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,
00,6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,
00,00
"IBeam"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,
00,45,00,25,00,5c,00,44,00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,69,00,
6e,00,76,00,69,00,73,00,69,00,62,00,6c,00,65,00,2e,00,63,00,75,00,72,00,00,
00

If you click one or other, it does change the mouse pointers in Registry but the system needs to be refreshed for it to take effect "opening mouse controls and clicking ok does the job but i was wondering if there was a better way ?

Furture in the post he gives a AutoHotKey example, *dont kill me, i am just the messager ^^*

SPI_SETCURSORS := 0x57
result := DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS, "UInt", 0, "UInt", 0, "UInt", '0')
MsgBox Error Level: %ErrorLevel% `nLast error: %A_LastError%`nresult: %result

Which i translated into

Const $SPI_SETCURSORS := 0x57
$result = DllCall("SystemParametersInfo", "UInt", $SPI_SETCURSORS, "UInt", 0, "UInt", 0, "UInt", '0')

but it doesn't seam to do anything, if anyone knows more about this dllcall i would be greatful :)

Edited by IanN1990
Link to comment
Share on other sites

Search WinAPI (help file really) for _WinAPI_SystemParametersInfo as it's silly re-creating duplicate functions.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Did you check the return values? Always debug your code by referring to the help file and the return values. Plus it's True/False (Boolean) not 1/0 as stated in the help file.

#include <WinAPI.au3>

ConsoleWrite(_WinAPI_ShowCursor(False) & @CRLF)

Sleep(10000)

ConsoleWrite(_WinAPI_ShowCursor(True) & @CRLF)

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

No problem FireFox. To be honest the return value was -1 for me 'If no mouse is installed, the display count is -1.' which is a little strange to say the least.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I should note here, i dont use WinAPI's alot so i am offgaurd here ^^ but.

I serched _WinAPI_SystemParametersInfo.

Retrieves or sets the value of one of the system-wide parameters

#include <WinAPI.au3>

_WinAPI_SystemParametersInfo($iAction [, $iParam = 0 [, $vParam = 0 [, $iWinIni = 0]]])

but i am not exactly sure what to do with it ? What action would i be setting ? What does the function do ?

I ran your script and got the following outcome. Though i didnt see the mouse disappear at all.

>"C:Program Files (x86)ScriptsAutoit SoftwareSciTe..autoit3.exe" /ErrorStdOut "C:UsersNameDesktopScript.au3"

-1

0

>Exit code: 0 Time: 10.322

*Edit. Ok so -1 means no mouse is installed. Hmmmmmm I guess this mouse connected to the computer cant be a mouse then as the computer never lies! :D

Edited by IanN1990
Link to comment
Share on other sites

This is my last post for today as they will be cutting off the power soon.

Below is some code for changing the mouse pointers to invisible and then back to user-set pointers. If you want system defaults, u will need to edit the regwrites to load the system ones rather then the one i perfer "which is a +".

*Also for it to hide a mouse, u need a invisible mouse icon to load into the registry. Mine "for this code" is on the desktop, if u have it in a different location u will need to edit the regwrites.

RegWrite("HKEY_CURRENT_USERControl PanelCursors", "AppStarting", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Arrow", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Crosshair", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Hand", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Help", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "IBeam", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "No", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "NWPen", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeAll", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeNESW", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeNS", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeNWSE", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeWE", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "UpArrow", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Wait", "REG_EXPAND_SZ", "%USERPROFILE%Desktopinvisible.cur")

DllCall("user32.dll", "int", "SystemParametersInfo", "int", 0x57, "int", 0, "int", 0, "int", 0)

sleep(2500)

RegWrite("HKEY_CURRENT_USERControl PanelCursors", "AppStarting", "REG_EXPAND_SZ", "%SYSTEMROOT%Cursorscross_l.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Arrow", "REG_EXPAND_SZ", "%SYSTEMROOT%Cursorscross_l.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Crosshair", "REG_EXPAND_SZ", "%SYSTEMROOT%Cursorscross_l.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Hand", "REG_EXPAND_SZ", "%SYSTEMROOT%Cursorscross_l.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Help", "REG_EXPAND_SZ", "%SYSTEMROOT%Cursorscross_l.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "IBeam", "REG_EXPAND_SZ", "")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "No", "REG_EXPAND_SZ", "%SystemRoot%cursorsaero_unavail_xl.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "NWPen", "REG_EXPAND_SZ", "%SYSTEMROOT%Cursorscross_l.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeAll", "REG_EXPAND_SZ", "%SystemRoot%cursorsaero_move_xl.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeNESW", "REG_EXPAND_SZ", "%SystemRoot%cursorsaero_nesw_xl.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeNS", "REG_EXPAND_SZ", "%SystemRoot%cursorsaero_ns_xl.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeNWSE", "REG_EXPAND_SZ", "%SystemRoot%cursorsaero_nwse_xl.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "SizeWE", "REG_EXPAND_SZ", "%SystemRoot%cursorsaero_ew_xl.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "UpArrow", "REG_EXPAND_SZ", "%SYSTEMROOT%Cursorscross_l.cur")
RegWrite("HKEY_CURRENT_USERControl PanelCursors", "Wait", "REG_EXPAND_SZ", "%SYSTEMROOT%Cursorscross_l.cur")

DllCall("user32.dll", "int", "SystemParametersInfo", "int", 0x57, "int", 0, "int", 0, "int", 0)

Also i still have not found a way to change the style for input, so it displays password symbols. I changed from GUISetStyle to GUICtrlSetStyle "The original post has been updated" but when i click the button i can still see the text in the input.

Link to comment
Share on other sites

Also i still have not found a way to change the style for input, so it displays password symbols. I changed from GUISetStyle to GUICtrlSetStyle "The original post has been updated" but when i click the button i can still see the text in the input.

You are using the parameters wrongly.

The good way is :

GUICtrlSetStyle($Input, $ES_PASSWORD)

The function itself works, but you have not the password symbols showing; maybe the input needs a special redraw or this is a Windows' issue.

Br, FireFox.

Link to comment
Share on other sites

Look at _DisplayPasword in my signature. This will give a you hint on how to set the characters of the password from the standard bullet point.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Look at _DisplayPasword in my signature. This will give a you hint on how to set the characters of the password from the standard bullet point.

Maybe the answer is written somewhere, but I'm tired to search. What kind of issue it is?

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

It's not an issue, just Ian wanted to set the character of the password. If you look at _DisplayPassword the clue is setting $iPasswordCharacter = 9679.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

It's not an issue, just Ian wanted to set the character of the password. If you look at _DisplayPassword the clue is setting $iPasswordCharacter = 9679.

I mean, why it works with GUICtrlSendMessage and not GUICtrlSetStyle?

Br, FireFox.

Link to comment
Share on other sites

Because EM_SETPASSWORDCHAR is a message whereas ES_PASSWORD is a style.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Because EM_SETPASSWORDCHAR is a message whereas ES_PASSWORD is a style.

You mean, that the $ES_PASSWORD style for example, block the copy function; and the message EM_SETPASSWORDCHAR sets the circle symbol ?

So autoit automatically sends the message when setting the password style ?

Just for understanding.

Br, FireFox.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...