call indentation tool

Working on new editor enhancements?
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

call indentation tool

Post by eddy »

Hi,
Is there a way to call programmatically the indentation tool for specified lines ?
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: call indentation tool

Post by skywalk »

Don't know, but have you tried sendkeys( [Ctrl+i] ) in a PB tool?
indentation shortcut = [Ctrl+i].
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Re: call indentation tool

Post 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 ?
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: call indentation tool

Post by skywalk »

The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Re: call indentation tool

Post by eddy »

Thx, I works great. :wink:
Now, I have to found a way to read PB editor preferences.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: call indentation tool

Post 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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Re: call indentation tool

Post 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 :?
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Post Reply