Page 1 of 1

call indentation tool

Posted: Fri Mar 22, 2013 6:33 pm
by eddy
Hi,
Is there a way to call programmatically the indentation tool for specified lines ?

Re: call indentation tool

Posted: Fri Mar 22, 2013 7:42 pm
by skywalk
Don't know, but have you tried sendkeys( [Ctrl+i] ) in a PB tool?
indentation shortcut = [Ctrl+i].

Re: call indentation tool

Posted: Fri Mar 22, 2013 8:06 pm
by eddy
skywalk wrote:Don't know, but have you tried sendkeys( [Ctrl+i] ) in a PB tool?
indentation shortcut = [Ctrl+i].
sendkeys :?: Is it a win32 api function ?

Re: call indentation tool

Posted: Fri Mar 22, 2013 9:07 pm
by skywalk

Re: call indentation tool

Posted: Fri Mar 22, 2013 10:33 pm
by eddy
Thx, I works great. :wink:
Now, I have to found a way to read PB editor preferences.

Re: call indentation tool

Posted: Fri Mar 22, 2013 11:10 pm
by skywalk
Cool, just remember that the PB Preferences file is only completely updated after IDE is closed.
Like if you add files to the IDE, they are not updated in the preferences file.
Preferences wrote:[OpenedFiles]
Count = 5
Add 2 files...
Preferences wrote:[OpenedFiles]
Count = 5
Close IDE...
Preferences wrote:[OpenedFiles]
Count = 7
freak said to use the PB_TOOL_FileList environment variable instead.

Re: call indentation tool

Posted: Sun Mar 24, 2013 11:06 am
by eddy
msdn wrote:This function does not reset the keyboard's current state. Any keys that are already pressed when the function is called might interfere with the events that this function generates.
During the test, there was a conflict between Ctrl+C & Ctrl+I :?