Recent

Author Topic: Is it possible to macros open file?  (Read 5165 times)

staratel20

  • Full Member
  • ***
  • Posts: 206
Is it possible to macros open file?
« on: February 07, 2016, 04:47:59 pm »
For example I create some macros, that need read ini-file with preferences for to work correct. Is it possible? After look at unit SynEditKeyCmds I think it's don't. If I'm right - is it in plans to provide this this future?
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Is it possible to macros open file?
« Reply #1 on: February 07, 2016, 05:35:00 pm »
Indeed currently not supported.

Also no plan to work on it.

No objection to add, if a good patch (e.g. for TStringList or TIniFile) is supplied. (Ideally with both calling methods, see all the ifdefs).

Other API for files can be discussed.

Patches may have to wait a bit before being applied, as there already is a backlog on my work queue.

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Is it possible to macros open file?
« Reply #2 on: February 07, 2016, 06:39:45 pm »
Try to resolve it if you assigned to me(if my progress will to slow pledge to notify you).

Also is to be good do the next thing:

when user click View-Editor macros he(now) see three tabs: Recorded, Project, IDE. Think better do three tabs more intuitive:
Session, Project, IDE

and when user press Record and then Stop - macros appears in current active tab.

And second thing - when assigning hot key to macros user should press Ok for to see that the hot key already in use. It's to late - be good to notify user at once he capture the hot key.
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Is it possible to macros open file?
« Reply #3 on: February 07, 2016, 10:22:37 pm »
"Session" is already used in the IDE. there is a project session (which units a open, where the caret is, etc) and that is saved in the project.lps file.

Maybe "Temporary".

If you want to work on it, you are welcome.


staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Is it possible to macros open file?
« Reply #4 on: February 08, 2016, 09:36:39 am »
Temporary looks not bad. But user don't know anything about expiration time. If use this term be good if under macros list will placed the caption like: "Macros in this section will be lost after restart IDE". When user switch to Project tab - caption is like: "Macros in this section will be available only for this project on every start IDE" , etc.

Think that terms Unger or Rush - good candidates too.

Thank's for your welcome, I'm in)).
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Is it possible to macros open file?
« Reply #5 on: February 08, 2016, 02:27:09 pm »
"unger" doesn't seem to exist. "rush" as far as I know makes no sense in this context.

Anyway, please open a request in the bugtracker. So it will not be forgotten.(patch welcome, but not necessary)

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Is it possible to macros open file?
« Reply #6 on: February 08, 2016, 02:37:06 pm »
Martin_fr: thank for your explanations Martin(English it's not my native language and I spent some time with google dictionary - bad try : )  ). Ok, I'll be post this on bugtracker. But also I notice similar things to notepad, so be sure - I'll not forgot ;).
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Is it possible to macros open file?
« Reply #7 on: February 08, 2016, 02:51:16 pm »
Also want to ask: how to do better - create some issues for this things or one issue for all of this?
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Is it possible to macros open file?
« Reply #8 on: February 08, 2016, 04:03:18 pm »
currently it is only the text changes: "temporary" and labels with explanation that go on the bug tracker. (they are one issue)

patches for stringlist/inifile can be discussed here.

Or did I miss any other point?

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Is it possible to macros open file?
« Reply #9 on: February 08, 2016, 06:02:16 pm »
don't miss anything, now clean).
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Is it possible to macros open file?
« Reply #10 on: February 08, 2016, 08:59:17 pm »
Martin: T'm sorry, miss that fact that the recorded macros needs to appear at tab now active, and button Record must be enabled at once as window Macro recorder appears. do you agree with that?
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Is it possible to macros open file?
« Reply #11 on: February 08, 2016, 09:54:00 pm »
the "recorded" tab is active when I open the window for the first time.

After that it probably remembers what tab you last selected, and that would be oke

the "record" button is indeed buggy, it should be active.

And as a feature, pressing the "record" button might even switch to the recorded tab

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Is it possible to macros open file?
« Reply #12 on: February 08, 2016, 11:53:04 pm »
Quote
the "recorded" tab is active when I open the window for the first time.

After that it probably remembers what tab you last selected, and that would be oke

the "record" button is indeed buggy, it should be active.

That's all I glad to hear)).

Quote
And as a feature, pressing the "record" button might even switch to the recorded tab

Don't you think is better to just recorded macros appear in the current active tab? Think in the most of cases user will move macros after rec - what for this one excess doing if he can just activate interested tab and press rec?
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Is it possible to macros open file?
« Reply #13 on: February 09, 2016, 12:31:37 am »
Don't you think is better to just recorded macros appear in the current active tab? Think in the most of cases user will move macros after rec - what for this one excess doing if he can just activate interested tab and press rec?

I dont know.

I use macros a lot for quick temporary stuff. Do an action on one line, the repeat on the following lines. And that means those macros will be thrown away right away.

I use the key combo though, not the button. I think for keycombo that is correct. If the button defaults to different behaviour then this is confusing.
The button could be a tool button with drop down and offer both options.

staratel20

  • Full Member
  • ***
  • Posts: 206
Re: Is it possible to macros open file?
« Reply #14 on: February 09, 2016, 08:27:56 pm »
Quote
the "record" button is indeed buggy, it should be active.

after think about this all I think if rec button will active(bug will fixed) maybe better keep all as is. Because Drop-down list - component, that we always need try to avoid where it possible, because it's need two clicks instead of one.

Also if user(like me) select the tab and then press rec(so he expect to see the macros appear in current tab) - it will be logically right to switch tab to Recorded after user press stop button.
Windows 7 SP1 x64, FPC 3.0.0, Lazarus from trunk: http://svn.freepascal.org/svn/lazarus/trunk

CountIdentity, ModeClassName - good property naming
IdentityCount,  ClassNameMode  - bad property naming

 

TinyPortal © 2005-2018