Home Download Screenshots Wiki Plugins Translations Developers Donate Forums/Help Contact Us |
StrokeIt
Variables and logicPosted by dapobe
Hello
Is it posible to use logical variables in StrokeIt? For example: I have a gesture to play Winamp. But It would be useful to have a way to know if Winamp is in memory (Activate Window) or if it needs to be started (Start Program) Or sometimes a different action needs to be performed depending if its the first time or second... Is just an idea... General variables... If-then-else commands controlled by var... etc... Dapobe
Well, this is not full-fledged scripting, variables and flow control, but consider the following:
The basic requirement for implementing logic and flow control is that information or return values need to be maintained and passed from one command to the next. Using your existing UI design you could modify existing commands and add new ones such that a status, return value or literal string could be passed to the next command. The next command could be configured to accept this value being passed in and act upon it (or not). Not comprehensive, but pragmatic. Dale
Hi Jeff,
I think Girder [url=http://www.girder.nl]http://www.girder.nl[/url] and your program StrokeIt are very similar in the tree structure and girder use lua script. [url=http://www.lua.org]http://www.lua.org[/url] Perhaps you can use it too ?! [url=http://www.girder.nl/help/girderlua.php]http://www.girder.nl/help/girderlua.php[/url] with best regards Leo
Here's what I have in mind at the moment:
- Rework the plugin handling code to allow some interplugin communication - Allow plugins to call commands in other plugins - Allow plugins to return values - Allow plugins to have commands that are not available through the GUI. Note: none of the plugin changes mentioned above will affect the GUI in any way, it's all just internal changes that will allow me to create a "Scripting" plugin that will embed a simple scripting language (Lua looks promising, thanks Leo) - The scripting plugin will be text-based instead of a GUI. Where a normal plugin command would have its configuration stuff, the scripting plugin will probably just have a user-specified description of what the script does, a button to edit the script, and a settings button. - Pressing the "edit" button will write the script to a file, and launch either the default text editor or, if specified, a user-chosen editor. The plugin will automatically detect changes in the file and reload whenever the file is saved in the editor. - Pressing the "settings" button will allow the user to set the editor used to edit the script. There will probably be more settings here in the future. - The scripting plugin will be able to call any function in any plugin (including the newly created type of commands that are not available through the GUI). This will allow developers to easily extend the scripting language to meet their needs. Ultimately this will give us a scripting language that can do everything that StrokeIt can already do, and will add logic structures, loops, variables, and comparisons without disrupting the existing interface. Please let me know what you think, Jeff
I've solved this very nicely by using WinBatch (www.winbatch.com). It can do just about any multi-window function you can dream up. Most of my stroke-it commands just call a WinBatch macro which does the heavy lifting. For example, a trivially simple macro that either gives my FTP client focus or starts it if it isn't running looks like:
In a perfect world, it would be cool to integrate WinBatch right into StrokeIt, but I do just fine by running programs. Wade [url=http://www.wademan.com]http://www.wademan.com[/url]
|