Bert Posted November 1, 2007 Share Posted November 1, 2007 I did some searching, and I'm trying to find out what cursor file is being used. I understand you can get the type of cursor, (arrow, Cross) but how does one determine which cursor file is loaded? I looked in the registry, but no luck. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
zfisherdrums Posted November 1, 2007 Share Posted November 1, 2007 (edited) Hello Volly, Try this: For $i= 1 to 20 $var = RegEnumVal( "HKEY_CURRENT_USER\Control Panel\Cursors", $i ) If @error <> 0 then ExitLoop $file = RegRead( "HKEY_CURRENT_USER\Control Panel\Cursors", $var ) If @error = 0 then $output = StringFormat( "%s %s %s", $i, $var, $file ) ConsoleWrite( $output & @CRLF) EndIf Next Edited November 1, 2007 by zfisherdrums Identify .NET controls by their design time namesLazyReader© could have read all this for you. Unit Testing for AutoItFolder WatcherWord Doc ComparisonThis here blog... Link to comment Share on other sites More sharing options...
Bert Posted November 2, 2007 Author Share Posted November 2, 2007 (edited) Hello Volly, Try this: For $i= 1 to 20 $var = RegEnumVal( "HKEY_CURRENT_USER\Control Panel\Cursors", $i ) If @error <> 0 then ExitLoop $file = RegRead( "HKEY_CURRENT_USER\Control Panel\Cursors", $var ) If @error = 0 then $output = StringFormat( "%s %s %s", $i, $var, $file ) ConsoleWrite( $output & @CRLF) EndIf NextNice script, but it doesn't tell me what cur file is loaded. This was the output when I ran it. 1 Windows default 2 Scheme Source 2 I know the one loaded is arrow_im.cur, for that is the default. If the user selected a custom one, I would not know what it is. How do I get the file name of the cursor that is being used? I've been trying to figure this one out, but I'm getting nowhere. Edited November 2, 2007 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
zfisherdrums Posted November 15, 2007 Share Posted November 15, 2007 I'm so sorry I haven't replied in a while. 1 ) Open up Start->Control Panel->Mouse 2 ) Select the "Pointers" tab 3 ) Select Windows Black (large)(system scheme) 4 ) Run the script; you should see the following output: 1 Windows Black (large) 2 Scheme Source 2 3 Arrow %SYSTEMROOT%\cursors\arrow_rm.cur 4 Help %SYSTEMROOT%\cursors\help_rm.cur 5 AppStarting %SYSTEMROOT%\cursors\wait_rm.cur 6 Wait %SYSTEMROOT%\cursors\busy_rm.cur 7 Crosshair %SYSTEMROOT%\cursors\cross_rm.cur 8 IBeam %SYSTEMROOT%\cursors\beam_rm.cur 9 NWPen %SYSTEMROOT%\cursors\pen_rm.cur 10 No %SYSTEMROOT%\cursors\no_rm.cur 11 SizeNS %SYSTEMROOT%\cursors\size4_rm.cur 12 SizeWE %SYSTEMROOT%\cursors\size3_rm.cur 13 SizeNWSE %SYSTEMROOT%\cursors\size2_rm.cur 14 SizeNESW %SYSTEMROOT%\cursors\size1_rm.cur 15 SizeAll %SYSTEMROOT%\cursors\move_rm.cur 16 UpArrow %SYSTEMROOT%\cursors\up_rm.cur "Windows Default" scheme does not appear to contain any file references when viewed in RegEdit. I would assume this is because the images are a resource in a system DLL. I could be wrong, though. Let me know if your results differ. Zach... Identify .NET controls by their design time namesLazyReader© could have read all this for you. Unit Testing for AutoItFolder WatcherWord Doc ComparisonThis here blog... Link to comment Share on other sites More sharing options...
therks Posted November 15, 2007 Share Posted November 15, 2007 I know the one loaded is arrow_im.cur, for that is the default.That's your default? For me that is the inverted medium sized cursor, certainly not my default. The script appears to work for me as well (and I'm using almost all custom cursors): Script output:1 2 Scheme Source 0 3 Arrow D:\Rob\Icons\Chrono Trigger\Sword.ani 4 Help D:\Rob\Icons\Chrono Trigger\Imp Walk.ani 5 AppStarting D:\Rob\Icons\Chrono Trigger\Marle Working.ani 6 Wait D:\Rob\Icons\Chrono Trigger\Crono Busy.ani 7 IBeam D:\Rob\Icons\Chrono Trigger\Cat Text Sel.ani 8 No D:\Rob\Icons\Chrono Trigger\Magus No1.ani 9 SizeNS D:\Rob\Icons\Chrono Trigger\Lucca VResize.ani 10 SizeWE D:\Rob\Icons\Chrono Trigger\Ayla HResize.ani 11 SizeNWSE D:\Rob\Icons\Chrono Trigger\Robo DResize2.ani 12 SizeNESW D:\Rob\Icons\Chrono Trigger\Frog DResize1.ani 13 SizeAll D:\Rob\Icons\Chrono Trigger\Robo Open.ani 14 UpArrow D:\Rob\Icons\Chrono Trigger\Hand.ani Something I noticed is that if the cursor is not changed from default there is no registry entry for it. You can test for yourself by opening regedit to this key: HKEY_CURRENT_USER\Control Panel\Cursors Try customizing your cursor, then refreshing that key, you should see the differences. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now