Cursor blink rate (IDE)

Everything else that doesn't fall into one of the other PB categories.
ssb
User
User
Posts: 44
Joined: Wed Jun 21, 2006 11:09 am

Cursor blink rate (IDE)

Post by ssb »

I don't think it's possible, but I'll ask anyway in case there is a workaround. How to adjust the cursor blink rate in IDE? It blinks very slowly and not respecting system-wide setting.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Cursor blink rate (IDE)

Post by Danilo »

For Windows, compile the following code with PB/Windows 32bit and make it an IDE tool:

Code: Select all

Scintilla = Val( GetEnvironmentVariable("PB_TOOL_Scintilla") )
period    = GetCaretBlinkTime_()
If period = 0
    period = 150
EndIf

; period = 150

If Scintilla
    SendMessageTimeout_(Scintilla,#SCI_SETCARETPERIOD,period,0,#SMTO_ABORTIFHUNG,2000,@result)
EndIf
You can set 'period = 100' if you want it really fast.

You should add the tool 2 times with the following triggers:
- Sourcecode loaded
- Sourcecode saved

'Sourcecode loaded' works on IDE startup for all loaded sources.
There is no trigger for new, unsaved sources. Maybe you want to
add a 3rd trigger for 'Before Compile/Run', so unsaved sources
get the new blinking rate when pressing F5 for the first time.
ssb
User
User
Posts: 44
Joined: Wed Jun 21, 2006 11:09 am

Re: Cursor blink rate (IDE)

Post by ssb »

Not the prettiest but definitely a clever workaround. :)

Thanks a lot, Danilo.
Post Reply