Tool - Can triggers be combined ?

Working on new editor enhancements?
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Tool - Can triggers be combined ?

Post by Blue »

I would like a tool (caret) I use all the time to run when
either a newfile is created
or a file already opened in the Editor becomes active.
So, is there a way to do that (combining 2 triggers) ?

This tool (which sets the caret to a certain width, or thickness, if you prefer) used to run fine (and automatically) with the trigger "SourceCode loaded"... until PB 6.10 ! Now, I have to run it "manually" to get it going. However, when it finally does, it works way better than it did in PB 6.04.
Last edited by Blue on Mon Feb 05, 2024 3:52 am, edited 1 time in total.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
Little John
Addict
Addict
Posts: 4789
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Tool - Can triggers be combined ?

Post by Little John »

Hi,

perhaps you can set up 2 instances of that tool with differnt triggers? Not very elegant, but it might work. :-)
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Tool - Can triggers be combined ?

Post by Blue »

Thank you, Little John.

To my great embarassment, such a simple workaround never even entered my mind. As you say, though, not elegant. The sophisticated programmer in me feels reluctant.

But thank you just the same. I'll try it.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
Bisonte
Addict
Addict
Posts: 1313
Joined: Tue Oct 09, 2007 2:15 am

Re: Tool - Can triggers be combined ?

Post by Bisonte »

i do exactly this so that text blocks are inserted for me by allowing
only one instance (by the programm) and analysing the start parameters.

The first call starts the program, if it is not already started, and all
further calls only give "commands" to the program.
When the IDE is terminated, the programme also terminates. (Trigger)
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Tool - Can triggers be combined ?

Post by Blue »

What are you talking about, Bisonte ?
I have read your post 20 times, and I still don’t have a clue.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
Bisonte
Addict
Addict
Posts: 1313
Joined: Tue Oct 09, 2007 2:15 am

Re: Tool - Can triggers be combined ?

Post by Bisonte »

I mean...

You create a "server application".

The program is started and waits... and only the parameters are evaluated when it is called again.

eg. : tool.exe -newsource, tool.exe -fileactive etc.

Helpful would be : https://www.purebasic.fr/english/viewto ... 40&t=58302

Sorry, but the translator sometimes does some pretty strange things ;)
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Tool - Can triggers be combined ?

Post by Blue »

Thanks for clarifying things, Bisonte.
Much appreciated.

Your idea is original and interesting.
I'll give your approach a spin to see if it works better than calling 2 separate instances of the same program.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
Post Reply