DonationCoder.com Forum

DonationCoder.com Software => DC Member Programs and Projects => Ecaradec's Software => Topic started by: ecaradec on January 13, 2012, 05:30 PM

Title: Qatapult
Post by: ecaradec on January 13, 2012, 05:30 PM
Application NameQatapult
Short DescriptionQatapult is keyboard application launcher focusing on the decomposition in objects and actions ala Quicksilver.
Supported OSesWindows 2000 -> 7
Websitehttp://emmanuelcaradec.com/qatapult/
Setup Filehttp://emmanuelcaradec.com/qatapult/bin/Qatapult.zip
Screenshots[ You are not allowed to view attachments ]
Change list10.03.2012 (summary of changes happened onto the period )
- plugin system for creating custom sources (in javascript )
- plugin system for defining new commands to use in rules (in javascript )
- plugin system for skin (in javascript )
- better ranking
- fix crashing when no debugger was installed
- alfred-like skin by pigeonlips
- bookmark plugin by ewemoa
- catalogs (allow to not include every source by default )
12.02.2012
- settings format change to xml
- basic plugin system for creating new rules
- a 'reload' rules command for quickly testing changes
- shift+enter now create newline in text
- provide multiple values inside rules
- a WINDOW source that list the currently active windows that can be queried for $x.title and $x.hwnd
06.02.2012
- the text now don't display vertically anymore
- the completion don't automatically select the first subfolder
- you don't need to hit the down key twice to browse the results
- results are cleared when you hide the ui, so that it's always clean when you invoke qatapult
- fuzzy matching on some results like on the startmenu items : "moz firx" will match firefox. All characters must be in the name in the correct order to match. That allows to miss a char and still get the correct result.
21.01.2012
I made some change progressively since the 15
- Fix some memory leak on images
- Hotkey configuration (you can now set you favorite hotkey in the settings )
15.01.2012
- Text edition mode : you can now switch to edit mode by typing . and then use the arrows and delete keys.
- You can also paste text into the UI with ctrl+v
- There is now support for extra user commands : there is no UI, but you can check them in the ini file. I added two examples. You can use %p (path), %d (directory ) and %f (filename ) as inputs
14.01.2012
- windows 2000/XP support (hopefully )
- status line
08.01.2012
- The focus issues should now be gone. Qatapult hides itself when it's not the foreground window
- The download of gmail contact is now limited to only new contacts
- The contact sources now fetch and displays the profile pictures from the gmail directory (the download of theses is a bit long of course : if you enable this, please wait that the download complete before closing Qatapult otherwise, you'll only get half of your contact )
- I added a special source (type Clock ) that display an animated clock. I'm not sure what I'm going to do with it but it's fun. If it gives you ideas, please share ;)
- You can add extra directories to index (they are currently limited to 3 level of recursion because indexing too large directories cause huge slow downs )
- The text is not typed anymore (it's displayed by underline the text on the icons ). I'm not sure if this behavior is very usable. Tell me what you think about it. However it definitly looks better.
18.12.2011
- remove the verb indexing from the shell (it's too slow, doesn't always work and not nicely extendable )
- scale small icons (badly )
- unicode storage for startmenu items
- icons in the listview
- new controls tabs/shift+tab for pane navigation, right for completion (the rest is a bit more difficult to bind right now )
- extra icons (with reference to people who made them, I removed one GPL icon so I think that my source code was automatically GPL till previous version )
- memory leak fixing
- automatic opening of listbox after 1 second
- slower (not a very desirable feature :I will need to spend some time there, it's ok on my very new PC, not sure on others )
15.12.2011
- fix a bug in the indexing of the verbs associated with the startmenu items
14.12.2011
- you can now send email (you'll need to edit the settings.ini file to add your email, username, password and smtp server )
rem : I use blat to send email, it requires that you add the stunnel proxy server if you use a ssl smtp server like gmail (http://www.stunnel.org/ )
- qsll can fetch your contact from gmail (see the little knob on the top right corner of the UI to give him the permission )
- items from the startmenu are now fetched from an index that make finding them faster
InstructionsHere is what you can do with the current version :

The invocation shortcut is shift+space

You can run an application by typing it's name

You can type windows path like that and browse the file system (tab works for completion )
c:\...

You can type text either with a ' prefix which will give text a boost, or just continue to type until there is nothing left but text and it will be automatically known

You can use this text in 2 ways. Once you get a text hit the right arrow then the down arrow to get a list of what is available at this point. There is two operation you can send a mail to a contact (this doesn't work yet ) or you can search a website. Type 'search with' then hit the right arrow to select which website to search.

You can try actions on applications too, you can open, get the properties and other things detected from the context menu.

Hit 'return' at any point to run the current action.

If you want to quit, just type quit in the first pane.
Current commands- Type 'name of your software' to run it, or followed by properties, sendto, etc...
- 'Quit' to quit the application
- 'Clock' to display a animated clock (won't display the animated clock before vista )
- 'text' 'EmailTo' 'name of your contact'
- type '.' to switch to text mode when typing something
Title: Re: Qatapult
Post by: Tuxman on January 14, 2012, 08:03 PM
So, this is Gnome DO for Windows?  ;D
Title: Re: Qatapult
Post by: ewemoa on January 14, 2012, 08:46 PM
It seems so if Gnome Do is Quicksilver for *nix ;)

plug for...
kupfer ftw!

Title: Re: Qatapult
Post by: Tuxman on January 14, 2012, 08:54 PM
Yes, that's what I meant: A copy.  8) ;D :)
(Nothing wrong with that.)

But is Quicksilver not already for Unix?  ;D
Title: Re: Qatapult
Post by: ewemoa on January 15, 2012, 02:02 AM
But is Quicksilver not already for Unix?  ;D

Although MacOS X is somewhat of a Unix I suppose, I dont' remember QS running on any other *nix.  Did/Does it?



But back to the main topic...I just tried the latest version on XP and noticed the following sort of thing after invoking "Options":

[ You are not allowed to view attachments ]

...that is, the window that came up seemed positioned a bit too high so the upper portion was cut off.

To work-around this, the following seemed to work:


May be there's a better way :)



My apps are located under X:\apps -- I didn't figure out how to add paths to the Options dialog.  When I right-click on the right area of the Options window a popup menu with a 'Delete' item shows up...Any hints?



Regarding the invocation shortcut -- is it possible to customize it already?  Shift+Space is one of those that I encounter difficulties with -- my ordinary text typing seems to often end up accidentally leading to that sequence being entered...
Title: Re: Qatapult
Post by: ecaradec on January 15, 2012, 11:02 AM
Yes, Qatapult is a copy of Quicksilver (for the moment ... but I have terrribles projects )

I don't think Quicksilver ever worked on Unix, I think that it was all objective-c and it may have discouraged any porting effort.

Thanks for the bug report ewemoa, it's fixed.

To add folders to your search path, you can left click on the first item. Try clicking slightly at the beginning of the row, otherwise the component doesn't understand that as an edition. You should be able to add X:\apps there.

I'll allow to change the invocation shortcut soon, I agree with your remark, I tend to invoke it without really willing it.

I also added new changes :
- Text edition mode : you can now switch to edit mode by typing . and then use the arrows and delete keys.
- You can also paste text into the UI with ctrl+v
- There is now support for extra user commands for files : there is no UI, but you can check them in the ini file. I added two examples. You can use %p (path), %d (directory ) and %f (filename ) as inputs

I really need to find a way to simplify the UI of the settings, as it is taking me more time to code that the actual functions...



Title: Re: Qatapult
Post by: ewemoa on January 15, 2012, 06:02 PM
...it's fixed.

Thanks!  Hope to try it out on an XP machine soon.

To add folders to your search path, you can left click on the first item. Try clicking slightly at the beginning of the row, otherwise the component doesn't understand that as an edition. You should be able to add X:\apps there.

Thanks for the tip -- seems to work here (at least under W7).

I'll allow to change the invocation shortcut soon, I agree with your remark, I tend to invoke it without really willing it.

Looking forward to it!

I also added new changes :
- Text edition mode : you can now switch to edit mode by typing . and then use the arrows and delete keys.

Interesting -- I see a single large pane when I enter that mode.

- You can also paste text into the UI with ctrl+v

Worked here -- definitely nice to have this functionality.

- There is now support for extra user commands for files : there is no UI, but you can check them in the ini file. I added two examples. You can use %p (path), %d (directory ) and %f (filename ) as inputs

I see:

[FileVerbs]
count=2
0_name=Cmd here
0_workdir=%d
0_command=cmd
0_args=

If there are more than two commands, does the value of count need to be updated?

Also, I have not succeeded in getting "Cmd here" and "Explore here" to appear in my UI.  Typing either cmd or explore and looking through the results doesn't appear to show the associated custom commands.  Any hints?

I really need to find a way to simplify the UI of the settings, as it is taking me more time to code that the actual functions...

What do you think of Firefox's "about:config" UI?  Would it be easy to implement?
Title: Re: Qatapult
Post by: ecaradec on January 16, 2012, 06:52 AM
Interesting -- I see a single large pane when I enter that mode.
I watched some Quicksilver video and the interface seems to behave that way. I actually liked the idea as it gives more space and make things much clearer when you need to edit things. I was a bit annoyed of allowing to edit paths inside the thumbnail that I used to display text.

If there are more than two commands, does the value of count need to be updated?
Yes, you need to update the value of count.

Also, I have not succeeded in getting "Cmd here" and "Explore here" to appear in my UI.  Typing either cmd or explore and looking through the results doesn't appear to show the associated custom commands.  Any hints?
Hum, I put the "cmd here" and "explore here" in the settings.default.ini, you need to copy these lines inside your settings.ini. The default is just here to be used if there is no local settings.ini file.

What do you think of Firefox's "about:config" UI?  Would it be easy to implement?
That's a nice idea, but I'm not sure that it brings a lot of value over just editing an ini file. I'll probably do a fully featured settings UI, I just need to polish a bit things to make things easier to setup. That's should be ok anyway.
Title: Re: Qatapult
Post by: ewemoa on January 17, 2012, 02:43 AM
...it's fixed.

Thanks!  Hope to try it out on an XP machine soon.

Worked here under XP :)
Title: Re: Qatapult
Post by: ewemoa on January 17, 2012, 03:01 AM
Hum, I put the "cmd here" and "explore here" in the settings.default.ini, you need to copy these lines inside your settings.ini. The default is just here to be used if there is no local settings.ini file.

settings.ini is where I saw them.  Any other ideas what I might be doing wrong?

That's a nice idea, but I'm not sure that it brings a lot of value over just editing an ini file. I'll probably do a fully featured settings UI, I just need to polish a bit things to make things easier to setup. That's should be ok anyway.

Not trying to convince you which way to go with the following -- just sharing some thoughts.

As I see it, the FF about:config UI provides a number of benefits:


I find settings-related GUI programming to often be a hassle -- though it's certainly nice from a user perspective to have a nice GUI for learning what can be configured and nice to be guided to "correct" values.  I think though that making it possible for a 3rd party app to provide a GUI for displaying / writing settings is attractive -- a minimal config UI like what FF provides seems like the main dev(s) can channel / focus their effort / time / resources on other functionality of the app.

Well, there's my two local currency units :)
Title: Re: Qatapult
Post by: ecaradec on January 17, 2012, 04:17 AM
Commands only appears when you have a file selected. Sounds stupid but I didn't mention it... Are you trying to see them on the first pane ?
Title: Re: Qatapult
Post by: ewemoa on January 17, 2012, 05:34 PM
Commands only appears when you have a file selected. Sounds stupid but I didn't mention it... Are you trying to see them on the first pane ?

Doh!  Indeed, that was it!  The problem was definitely on this end.

Thank you :)
Title: Re: Qatapult
Post by: ewemoa on January 20, 2012, 04:25 PM
When there are exactly two panes displayed and I press tab a second time, I would like for the first pane to be selected...and analogously for 3 panes.  What do you think?
Title: Re: Qatapult
Post by: ewemoa on January 20, 2012, 04:40 PM
Attached is a quick hack to demonstrate the idea of getting Qatapult to guess some context and fill in its first pane with something relevant.



To install, unzip the zip file.

To use, make sure Qatapult and the included .exe file are running, and type control+shift+space while a Windows Explorer window is active or Notepad++ is active and displaying some file.

To modify, just edit the included .ahk file and reload the script via the tray icon menu.



Only tested on Windows 7 x64.
Title: Re: Qatapult
Post by: ecaradec on January 21, 2012, 04:25 AM
The first idea is very good, I'll need to polish my code a bit before adding it. It didn't work when I tried but I feel that cycling around the panes would feel a bit more free instead of just locking on the last pane. That way you could just tab-tab-tab and polish your command before running it. However I think that it will be a bit hard to maintain the other panes selected if you go back, but the UI idea is very good anyway.

The context idea is also very nice, and I will investigate in that way. I was considering adding sources of information like current HWND, title, clipboard as primary source of content for use with future extra hotkeys.
Title: Re: Qatapult
Post by: ecaradec on January 21, 2012, 05:06 AM
Hotkeys configurability is complete. You can now use your favorite key shortcut to invoke Qatapult.
Title: Re: Qatapult
Post by: ewemoa on January 21, 2012, 07:06 AM
I verified the hotkey configurabilty under XP -- worked fine here  :up:



Good point about difficulty with maintaining content of panes if tabbing cycles...I hope something good can be worked out though.



Looking forward to context functionality!  Current/last active HWND and clipboard sound good.  I suppose with HWND, one may be able to obtain relevant "selections" -- e.g. text or filepath(s).



By the way, I noticed that Home and End keys don't seem to work in text input mode.  Do you think it would be worth having (most?) editing-related key sequences work under those circumstances?  For example, for path-related editing, control+arrowkeys, control+shift+arrowkeys, control+delete, control+backspace seem quite handy.

I like how the escape key can be used to exit text input mode -- is there an advantage perhaps to not having the period key exit text input mode and instead behave so that a period may be typed?  I guess it doesn't seem confusing to me, but may be it would be for other folks...



I wanted to get at "text" from the first pane to operate on -- I see I can use %d, %p, and %f for path-related things, but is there something else for raw text?



He he.  Sorry if this is too much :)
Title: Re: Qatapult
Post by: ecaradec on January 21, 2012, 07:58 AM
I also noticed that period as a text input mode enabler is not very good since it prevent to type anything with a dot. I also found myself under cases where I'd like to filter extensions of some type and then typing a dot would prove useful.

By the way, I noticed that Home and End keys don't seem to work in text input mode.  Do you think it would be worth having (most?) editing-related key sequences work under those circumstances?  For example, for path-related editing, control+arrowkeys, control+shift+arrowkeys, control+delete, control+backspace seem quite handy.
Yes I know that some basics of text editing are not there right now. That's due to the fact that I need to reimplement a full text editing control that can work within a transparent window. Noone seems to have developed and share a control like that. Handling all common control shouldn't be too hard anyway.

raw text is not available for new command right now but I'll add these for sure. I also need to add some contextual mode selection so that text commands only appear when text is available and file commands only availables when a file is selected. That's should not be a problem anyway.

He he.  Sorry if this is too much
Don't worry your feedback is very welcome.



Title: Re: Qatapult
Post by: ewemoa on January 26, 2012, 01:02 AM
Yes I know that some basics of text editing are not there right now. That's due to the fact that I need to reimplement a full text editing control that can work within a transparent window. Noone seems to have developed and share a control like that. Handling all common control shouldn't be too hard anyway.

Sorry to hear there don't seem to be appropriate ready-made parts.  I hope it doesn't take too much of your energy / time working on this aspect.

raw text is not available for new command right now but I'll add these for sure. I also need to add some contextual mode selection so that text commands only appear when text is available and file commands only availables when a file is selected. That's should not be a problem anyway.

Looking forward to these things!



Attached is an updated helper program which provides a tray icon for the time being :)
Title: Re: Qatapult
Post by: ecaradec on January 28, 2012, 01:56 PM
I've switched my default keyboard launcher from FARR to Qatapult. There is still a few things that I miss like the fc plugins for math things. I'm carefully documenting the shortcomings of Qatapult, so I found a bunch a small little issues and I added some big things :


Title: Re: Qatapult
Post by: ewemoa on January 29, 2012, 03:16 AM
Thanks for the update :)

Qatapult remembers the last files you got from the file explorer. Just time the name of that file once you used it once and it should be there.

Nice!  Got this to work.

"Current selection" pseudo object (Quicksilver call them proxy ) is now the currently selected file from the explorer (ewemoa special ). I don't have multifile support inside Qatapult, so it will only take the first file for the time being but it would be totally possible to add the whole selection.

I was able to get a folder which was selected in Windows Explorer to open using "Current Selection" + "Open".   Also tested successfully: "Current Selection" + "Explorer here" and "Current Selection" + "Cmd here".

When I tried "Current Selection" + "Properties" for a file, I expected to see the properties dialog, but I didn't see any result.  Was anything supposed to happen?

Multiple file support would be nice -- especially for things like compression, computation of hashes, batch file conversion, etc.

The text moves are more complete with ctrl+back, ctrl+del, and control moves, etc..

Thanks!  I successfully tested Home, End, Ctrl+BS, Ctrl+Del, Ctrl+Left, and Ctrl+Right successfully.

On a related note, do you think eventually one will be able to select text with mouse and or keyboard?



BTW, when directory browsing (e.g. C:\Program Files in the first pane) with the results list visible, is there a recommended way to navigate up one directory level?  My brain was wired to press the left arrow key, but I when I tried that, I didn't notice any change.

Found the following section in the QS Manual (Files and Folders section):

Back up a folder hierarchy by typing ← or ? (i.e., a shifted / on a US keyboard). This can backup all the way to the root directory

I don't think I ever used ?, but used the left arrow key.  What do you think?



FWIW, my tests were on Windows 7 64-bit.
Title: Re: Qatapult
Post by: ecaradec on January 29, 2012, 07:06 AM
I wrote a somewhat official announcement and slightly humoristic announcement of Qatapult on my blog here : http://emmanuelcaradec.com/blog/qatapult-a-fairy-tale-for-the-99 .
Title: Re: Qatapult
Post by: ecaradec on January 29, 2012, 07:31 AM
Good spot with the properties. After a quick look I found that it's not the "current selection" that doesn't work but rather the properties command.

Selection should be a quick add for the keyboard, but the mouse would be a pain : I didn't found a good way to get the position of characters with the gdiplus lib. If someone know a way to do it I'd love that.

Multiple file support is totally on my list for the exact same kind of need you list : zipping. I'm not sure at which point I'll add them, because it's a rather large change, involving UI and changes in the way I store and release memory.

You can go up one level in the hierarchy by using ctrl+backspace right now, it will go back to the precedent space or \ like in the text edition mode. ? is a good idea but I'm not sure what I'm going to do on my azerty keyboard. I was really thinking to have \ complete the current folder, this is the reverse, I think I'll add it too. I'll probably move some keys on my keyboard ;)

The one thing that I'd really like to do now is to allow users to create custom rules from the settings. Rules are the internal way I store the various arguments and available command of items. The current idea I have is to allows the writing of description of that form (3 examples ) :

rule=FILE,"zip to",FILE
rulecmd=zip %p0 %p2

rule=FILE,"zip here"
rulecmd=zip %p0

rule=TEXT,"append to",FILE
rulecmd=appendtext "%t0" "%p2"

That should open a lot more possibility.

I'd also like to give rules special background : a google look when you search google, an amazon look for amazon, but this is more for the fun...


Title: Re: Qatapult
Post by: ewemoa on January 29, 2012, 09:04 PM
I hope to respond to your most recent post soon.

Just a quick note -- I didn't find Qatapult to handle some non-Latin text (e.g. CJK).  Specifically, pasting of such text in the first pane showed garbled results:

[ You are not allowed to view attachments ]

Not sure how to phrase this appropriately -- perhaps it is Unicode-related?
Title: Re: Qatapult
Post by: ewemoa on January 30, 2012, 12:46 AM
Selection should be a quick add for the keyboard, but the mouse would be a pain : I didn't found a good way to get the position of characters with the gdiplus lib. If someone know a way to do it I'd love that.

Sorry, I have no idea.



You can go up one level in the hierarchy by using ctrl+backspace right now, it will go back to the precedent space or \ like in the text edition mode. ? is a good idea but I'm not sure what I'm going to do on my azerty keyboard. I was really thinking to have \ complete the current folder, this is the reverse, I think I'll add it too. I'll probably move some keys on my keyboard ;)

Thanks for the tip -- Ctrl+BS worked here.

Do you think using the left arrow key is a bad idea?



The one thing that I'd really like to do now is to allow users to create custom rules from the settings. Rules are the internal way I store the various arguments and available command of items.

The general idea sounds nice :)

On a related note, may be you've seen the following already -- the QS Manual has a section that begins:

Command Objects and Droplets

Commands in Quicksilver can be represented as objects in Quicksilver. To create a command object, activate Quicksilver and enter a command as you normally do, but instead of typing return to execute it, instead type ⌃-return. You’ll see a new command window appear in which the object is a new command object of the command you entered and a default action which is probably Run.

The section continues with information about functionality for scheduling commands and other bits including the saving of commands to a file.



I'd also like to give rules special background : a google look when you search google, an amazon look for amazon, but this is more for the fun...

Mmm, sounds good!
Title: Re: Qatapult
Post by: ecaradec on January 30, 2012, 05:08 AM
I didn't find Qatapult to handle some non-Latin text (e.g. CJK)
I think that this is font related. The font I use is arial, and it probably doesn't handle cjk characters. I'll need to give an option to use alternate font so that it works.
Title: Re: Qatapult
Post by: ecaradec on January 30, 2012, 05:29 AM
Do you think using the left arrow key is a bad idea?
No that would be actually better, because ctrl+back means precedent word or slash whereas ctrl+left or ? would mean only precedent slash and it would be coherent with the \ and right completion.

About the command object : this is very nice. I wasn't sure at first. I understand that this mean assigning a keyword on a set of multipanes selection. You can then reinvoke the command later. Do you understand it that way too ?
Title: Re: Qatapult
Post by: pigeonlips on January 30, 2012, 04:19 PM
Hi There.

I've been playing with it for a while now and have to say i really like it. Thanks for the great tool

raw text is not available for new command right now but I'll add these for sure. I also need to add some contextual mode selection so that text commands only appear when text is available and file commands only availables when a file is selected. That's should not be a problem anyway.

+1 for me. I think this would allow the user to extend the functionality very quickly and make it much more versatile. Ps tried this and was surprised it almost worked! although it looked up the full path of the shortcut i'd selected :)

2_name=Define
2_workdir=%d
2_command=http://ninjawords.com/%p0
2_args=


here's a few other ideas i think would be great!

* custom icon on the file verbs.
* active HWND in the first pane for window management. I'd love to use it to max, min windows, switch to open windows, close an open window etc.

Also a little question. Do the icons for shortcuts look bad for anyone else? Maybe this is just a windows xp thing. Guess there's nothing you can do about that if it is.

Title: Re: Qatapult
Post by: ecaradec on January 30, 2012, 04:42 PM
I've been playing with it for a while now and have to say i really like it. Thanks for the great tool
Thanks  8) !

I could add raw text support but I fear that I'll change the format to support the more flexible rule description as it will give the ability to create 3 pane commands (like [text, appendto, file] , etc... ). That would break all configurations done there. I have to think about this a bit before moving on.

Custom icon on file verb works. Try adding an icon with the same name as your text. This may not last forever, but this works for the moment.

I'll add the hwnd soon. There is a lot of potential for extensions there.

Yes, the icons looks bad because of Windows XP. The support for large icon began with vista, although I might add a way to override the default icons with your own. That way you could have good looking icons for your favorites apps and it would allows for themes too.
Title: Re: Qatapult
Post by: pigeonlips on January 30, 2012, 05:11 PM
nice, just modified the websites.db to add ninjawords. Then i found i couldn't stop!

"key","display","href","searchHref","icon","bonus"
"NinjaWords","Ninja Words","http://ninjawords.com/","http://ninjawords.com/%q","ninjawords",""
"GoogleNews","Google News","http://news.google.com/news","http://news.google.com/news?q=%q","googlenews",""
"BBCNews","BBC News","http://www.bbc.co.uk/cgi-bin/search/results.pl?tab=news&go=homepage","http://www.bbc.co.uk/cgi-bin/search/results.pl?tab=news&go=homepage&q=%q","bbcnews",""
"Wikipedia","Wikipedia","http://en.wikipedia.org/wiki/","http://en.wikipedia.org/wiki/Special:Search?search=%q","wikipedia",""
"GoogleMaps","Google Maps","http://maps.google.com/maps","http://maps.google.com/maps?q=%q","googlemaps",""
"Google","Google","http://google.com","https://www.google.com/#q=%q","google","0"
"Amazon","Amazon","http://amazon.com","http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=%q","amazon","0"
"YouTube","You Tube","http://www.youtube.com/","http://www.youtube.com/results?search_type=search_videos&search_sort=relevance&search_query=%q&search=Search","youtube",""

feel free to use what you want. for the pngs i just used google images (using qatapult with my new db of course) and saved the nicest look ones.
Title: Re: Qatapult
Post by: pigeonlips on January 30, 2012, 05:35 PM
thanks for the quick reply.

Thanks  8) !

np - i have tryed them all. Am a big executor and Farr user. I have to say i really like the look and feel of this though. Was always jealous of the mac users and quicksilver! Qatapult looks great.

I could add raw text support but I fear that I'll change the format to support the more flexible rule description as it will give the ability to create 3 pane commands (like [text, appendto, file] , etc... ). That would break all configurations done there. I have to think about this a bit before moving on.

I really think that this would be sweet. In Executor and Farr the ability to pass arguments to a program makes it uber versatile. I have written a ton of very small simple autohotkey complied scripts that do things like change text to UPPERCASE, TitleCase, spellchecking with aspell, move windows, change the volume etc. They all take arguments and it would be cool to be able to use them with qatapult. Also popular apps like everything, locate, foobar, nircmd, googlecl all can be controlled via arguments.

I love the idea of 3 pane command. [current selection, copy file to , destination] [current selection, upload to , youtube] [raw text, post to , facebook]

I think i just wet myself. Sorry - no pressure hehe.

Custom icon on file verb works. Try adding an icon with the same name as your text. This may not last forever, but this works for the moment.

Fricking sweet. Im already looking for PNG's.

I'll add the hwnd soon. There is a lot of potential for extensions there.

cannot wait. I'm no coder but know enough to knock out very simple stuff. Happy for you to use anything i get working.

Yes, the icons looks bad because of Windows XP. The support for large icon began with vista, although I might add a way to override the default icons with your own. That way you could have good looking icons for your favorites apps and it would allows for themes too.

meh. You can only work with what you got. Not a big deal. I guess you could add a column to the startmenu.db and make us winxp uses edit that. After all we deserve the pain and if you make it too easy for us we will be stuck on it for ever.  I'm long overdue upgrading to win 7 as it is so dont worry too much about it. 

Title: Re: Qatapult
Post by: pigeonlips on January 30, 2012, 05:39 PM
opps - also i nearly forgot. I do notice that the text goes a little funny from time to time and starts showing vertically.

Not sure if want to see.

Personally it doesn't bother me. Just FYI.


(http://img62.imageshack.us/img62/6848/funnytextqatapult.png) (http://imageshack.us/photo/my-images/62/funnytextqatapult.png/)



Title: Re: Qatapult
Post by: ewemoa on January 30, 2012, 06:21 PM
I do notice that the text goes a little funny from time to time and starts showing vertically.

I have also seen similar behavior occasionally but I haven't figured out how to reproduce it.
Title: Re: Qatapult
Post by: ewemoa on January 30, 2012, 09:02 PM
The font I use is arial, and it probably doesn't handle cjk characters. I'll need to give an option to use alternate font so that it works.

Thanks for the explanation.  

I have my fingers crossed that changing the font will get things working :)
Title: Re: Qatapult
Post by: ewemoa on January 30, 2012, 09:14 PM
About the command object : this is very nice. I wasn't sure at first. I understand that this mean assigning a keyword on a set of multipanes selection. You can then reinvoke the command later. Do you understand it that way too ?

Yes. 

IIRC, in QS, the action for invoking a command object was "Run".  I think usage was like:

Title: Re: Qatapult
Post by: ecaradec on January 31, 2012, 05:31 AM
[pigeonlips]
Well done with the db pigeonlips ;). The website source is really subpopulated.

I've seen the vertical text issue too. The Windows gdiplus api that measure the width of text sometimes returns invalid results. I've still to understand how to use it to avoid that issue. It seems to occur on some matches of results and query.

[ewemoa] : I'll add a font selection (at least in the settings ) so that you can confirm that this is ok. It seems to work with less exotic characters, so I suppose it should be ok still.


Title: Re: Qatapult
Post by: ecaradec on February 06, 2012, 07:18 AM
Hi,
I've uploaded a new version with a few polishing changes :

- the text now don't display vertically anymore
- the completion don't automatically select the first subfolder
- you don't need to hit the down key twice to browse the results
- results are cleared when you hide the ui, so that it's always clean when you invoke qatapult
- fuzzy matching on some results like on the startmenu items : "moz firx" will match firefox. All characters must be in the name in the correct order to match. That allows to miss a char and still get the correct result.

Nothing fancy, but that's should make Qatapult easier to use.
Title: Re: Qatapult
Post by: pigeonlips on February 06, 2012, 03:57 PM
download the new version but found that it doesn't see to work as well as the last. Heres a few things i've noticed:

>The "email to" and "search with" results seem to get confused in the 3rd pane. More often than not i only see my contacts despite selecting "search for"

> Also i have noticed that if i use "." to free type something say "hello", then esc out of qatapult, then summon it again type a new query say "notepad" move to the second pane, when esc or shift tab back to the first pane the old free text seems to reappear rather than "notepad". This seems erratic and doesn't happen all the time.

> if i over type a contact (i.e. continue typing past a match. eg one contacts called "james" but i type "james sdssfdfsdfsdgsgsgfsdf") in then the last pane then the pane shrinks and gets cut off. It looks like qatapult is resizing back to 2 panes but the lighter blue inlay is still visible in the darker blue border. also hitting down drops down an empty list box so i guess the 3 pane is active just not displayed.

(http://img12.imageshack.us/img12/4466/qatapultemailoverrun.jpg) (http://imageshack.us/photo/my-images/12/qatapultemailoverrun.jpg/)

Unrelated to this version there are also a couple of things that make it a little harder to use (for me anyway).

> while i like the use of the "." it would be nice if when using the pane for email i could free type an email address. Unfortunately most all email addresses  have a "." in them somewhere. Maybe have a "." top invoke and then Esc to get out?

> sometimes i'd like to search with something - but i don't get offered the action to do so as it query matches a program or command (ie try a google search for "notepad"). Not sure if it did this with the last version too.

> its not always clear what i have typed. (say i make a typo because im typing to quick. Unless i guess this is what i did and start backspacing)




Still loving the app! :)

Also just started using qatapult to navigate network shares, and its working really well.

Thanks.
Title: Re: Qatapult
Post by: ewemoa on February 06, 2012, 05:23 PM
Maybe have a "." top invoke and then Esc to get out?

This sounds nice to me.
Title: Re: Qatapult
Post by: ecaradec on February 06, 2012, 05:42 PM
I noticed the email and search with bug too. I uploaded a new version that fix that. I broke something in the selection of rules, in the previous version and this was causing a lot of issues. Check if your second issue is gone too, I suspect that it should.

The pane thing looks really bad. Your diagnotic is correct, Qatapult resize to two panes : no rule match anymore, so Qatapult doesn't know how many panes to display. I didn't bother fixing it till know as it's not super easy and is not very fonctionaly annoying, but I will as soon as possible.

I agree the dot is annoying when typing things. I was considering the same solution : use . to enter text mode and then esc to exit, but allows to type . when in text mode.  

The last item result is always the text result. If you want to search notepad on google then type your query and select that last results, it'll give you the text verb. It didn't always appears in older version but this should be ok now. I could also add a ' prefix that would enable text result only.

I also get lost when typing. I'm not sure about what I can do without degrading the look and feel of the ui. May be I could switch to text mode automatically if nothing is typed for a few sec ? I think that QS cancel the search if you wait too long, but I'm not sure if I like it or not.

Thanks for the report  :-*
Title: Re: Qatapult
Post by: pigeonlips on February 06, 2012, 06:41 PM
I noticed the email and search with bug too. I uploaded a new version that fix that. I broke something in the selection of rules, in the previous version and this was causing a lot of issues.

All fixed here - thanks :)

Check if your second issue is gone too, I suspect that it should.

Still there. Small problem and functionally not to bad. You can always backspace to delete and type again.

The pane thing looks really bad. Your diagnotic is correct, Qatapult resize to two panes : no rule match anymore, so Qatapult doesn't know how many panes to display. I didn't bother fixing it till know as it's not super easy and is not very fonctionaly annoying, but I will as soon as possible.

You could just apply the same principal as the first pane. If the text you type in to the contacts doesn't match any more it turns into a free text field. Seams to me more in line with what a user would expect input wise.

I agree the dot is annoying when typing things. I was considering the same solution : use . to enter text mode and then esc to exit, but allows to type . when in text mode.  

nice

The last item result is always the text result. If you want to search notepad on google then type your query and select that last results, it'll give you the text verb. It didn't always appears in older version but this should be ok now. I could also add a ' prefix that would enable text result only.

nice - didn't Know that. Now with the fuzzy logic there's a lot more to scroll through - but nothing the "end" wont solve :)

A prefix sounds sweet. I'd love that. Some logical choices (to me at any rate) are
quote ie "
or the ? symbol
or the + symbol
or the = symbol

I also get lost when typing. I'm not sure about what I can do without degrading the look and feel of the ui.

How using the [ label / caption ] control at the top (where the indexing progress appears that records and displays what you are typing) or bottom where the path is when you are using the file browsing functionality.  You could always make this control dbl up as a helpful hint for other text you want to show off. Some examples might be:

"press ESC to go back" in free text mode.

"Begin typing" if qatapult has nothing selected. Or display the time and date. or qatapult version etc - you preference. Maybe even "new version avalible hehe

"press end to use text as verb" when match list is longer that say 10 or whatever comfortably fits on the screen.

May be I could switch to text mode automatically if nothing is typed for a few sec ? I think that QS cancel the search if you wait too long, but I'm not sure if I like it or not.

personal preference, is that i hate things doing something without my input but that might be just me.

Thanks for the report 

A pleasure. Thanks for the app and the quick turnaround on posts!
Title: Re: Qatapult
Post by: ewemoa on February 06, 2012, 07:13 PM
May be I could switch to text mode automatically if nothing is typed for a few sec ? I think that QS cancel the search if you wait too long, but I'm not sure if I like it or not.

personal preference, is that i hate things doing something without my input but that might be just me.

I'm with pigeonlips on this.
Title: Re: Qatapult
Post by: ecaradec on February 07, 2012, 04:49 PM
Here is a bug fix version :
- It  fixes the issue that displayed incorrect results to popup. It happened when you typed extraneous tab.
- The missing pane bug should be fixed too. It'll display an empty result if there are no other results left now.

Title: Re: Qatapult
Post by: pigeonlips on February 07, 2012, 06:14 PM
Nice - Does what it says on the tin! both working as you describe.

Title: Re: Qatapult
Post by: pigeonlips on February 08, 2012, 03:48 PM
Howdy.

I'm just playing around with the settings.ini file. I'm trying to add a few more verbs. Is there any way to add a verb that shows up when theres no match for a indexed item?

 Here's one i'm trying:

....
[FileVerbs]
....
2_name=run on command line
2_workdir=%d
2_command=cmd
2_args=/K "%p0"

This seems to work but only if theres a match in the first pane. So if i type in "DIR" i get matches as there's other stuff in the Start menu that almost match, then i can run my verb and as expected it opens a command prompt and runs the command "DIR". But if i try anything more elaborate say "echo this and that" as theres no match in the first pane i only get the verbs (is that what the middle pane is called?) i get are email and "search with"
 
Title: Re: Qatapult
Post by: ecaradec on February 08, 2012, 03:53 PM
I've completed a first version that support user defined rules. Rules are the way you can define new multipanes commands. I've converted the old verb customisation to this, as this is much more flexible. Here is an example :

[rule_0]
0_arg=FILE
1_lbl=Cmd here
1_ico=icons\command.png
cmd=cmd.exe
args=
workdir=$0.directory

The configuration still has to be done via the ini file for the moment. Here is how it works :
- Firstly define a new [rule] block and give it a number starting from 0

- Then you can set two kinds of things :
    - a (x)_arg parameter to decide that the x parameter is of some predefined type. Useful predefined types right now are : FILE, CONTACT, CLOCK, WEBSITE and TEXT
    OR
    - a (x)_lbl + (x)_ico pair to add a custom word with an icon. You'll usually use those to put a verb

- Then define a cmd, args and a workdir. In those 3 fields you can use variables to access the values of the panes. The syntax for this is : $(pane_nb).(value). pane_nb can be any number from 0 to rule length (1 or 2 under the current ability of the UI ) . 'value' is the interesting thing : you can access any value that compose a type. For a FILE you can access path, directory, filename; For a CONTACT you can access display and email; For a WEBSITE you can get display, href, searchHref, icon; For a TEXT you can get text; CLOCK doesn't return anything yet, but it would probably time something.

@pigeonlips : don't invest too much on file verbs, tell me what you think about this ;).
Title: Re: Qatapult
Post by: pigeonlips on February 08, 2012, 05:42 PM
what am i doing wrong? It displays fine but when i invoke nothing happens?
....
[FileVerbs]
count=2
0_name=Cmd here
0_workdir=%d
0_command=cmd
0_args=
1_name=Explore here
1_workdir=%d
1_command=explorer
1_args=/e,/root,"%d"
[rule_0]
0_arg=TEXT
1_lbl=run on command line
1_ico=icons\terminal.png
cmd=cmd
args=/K "$0.text"
workdir=%d
[SearchFolders]
count=2
....
Title: Re: Qatapult
Post by: ewemoa on February 08, 2012, 06:09 PM
The following worked for me:

[QSLLContacts]
accessToken=
refreshToken=
email=
username=
password=
server=smtp

[rule_0]
0_arg=TEXT
1_lbl=run on command line
1_ico=icons\terminal.png
cmd=cmd.exe
args=/K "$0.text"
workdir=%d

However, pressing tab once I typed text in the first pane seemed to cause something I didn't want to be selected as the value for the first pane (e.g. try "explorer").

A flow that worked for me was:




On a side note, for entering text mode, I wonder if choosing a key that corresponds to something either not used or infrequently used in file paths would be doable.  Another aspect to consider might be if it can be typed under many key arrangements without having to press any modifiers such as Shift.

The only two such keys for the keyboard layout here that Windows Explorer complains about when renaming files are the slash and the backslash...The former is likely to be used in URLs while the latter is likely to be used in Windows paths.

I think this might be a point in favor of going for pigeonlips' suggestion concerning using the escape key to exit from text mode.
Title: Re: Qatapult
Post by: pigeonlips on February 08, 2012, 06:34 PM
still nothing for me. Glad its working for someone. lol.

Maybe its a windows xp thing, or maybe its me being lame and missing something!

I love the idea. Carnt wait to figure it out.....
Title: Re: Qatapult
Post by: ewemoa on February 08, 2012, 06:42 PM
pigeonlips:

I started from a fresh settings.ini generated by the newest Qatapult download.  I got the sense from what you posted that it was a modification of a settings.ini generated by an older Qatapult (e.g. reference to FileVerbs) -- may be the newest Qatapult doesn't handle some of the older settings-related info?

It's true that I tested on Windows 7 Pro 64-bit -- so not XP.
Title: Re: Qatapult
Post by: pigeonlips on February 08, 2012, 07:12 PM
what a f*****g muppet i am.

Its almost to shaming to post.

I had not downloaded the new version. Opps.

Some examples on how i'm putting this to use to follow



Title: Re: Qatapult
Post by: pigeonlips on February 08, 2012, 07:19 PM
In settings.ini

[rule_3]
0_arg=TEXT
1_lbl=set volume to
1_ico=icons\Volume.png
cmd=C:\Program Files\Qatapult\helpers\set-vol.exe
args=$0.text
workdir=%d


http://www.autohotkey.com/
create the following auto hotkey script in a text editor

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SoundSet, %1%, %2%, %3%, %4%
if ErrorLevel
    MsgBox, %ErrorLevel%

and compile it with the compiler (Ahk2Exe) to an exe. In this example :

C:\Program Files\Qatapult\helpers\set-vol.exe

now find a nice icon. I used:

http://www1.picturepush.com/photo/a/2772929/480/png/Volume.png?v0

you can now type in a number (in percent) ie 100 or 75 then tab to "set volume to"

the whole rules thing works really well!

Thanks ecaradec!

also thanks ewemoa - i might have still been playing around with the ini for using the old version for the rest of the week!

On a side note, for entering text mode, I wonder if choosing a key that corresponds to something either not used or infrequently used in file paths would be doable.  Another aspect to consider might be if it can be typed under many key arrangements without having to press any modifiers such as Shift.

what about the F keys - i never go near them my self. Just a thought.

Title: Re: Qatapult
Post by: pigeonlips on February 08, 2012, 07:46 PM
holy moly

[rule_4]
0_arg=FILE
2_arg=TEXT
1_lbl=Move file to
1_ico=icons\Move.png
2_lbl=C:\
cmd=cmd.exe
args=/C "move $0.path $2.text"
workdir=%d

Default to C:\ in the 2 pane, but you can "." and add a path of your choice!

Fricking nice. With these rules, for me, this just changed the game!

I'd love to be able to add pre defined entry's to the 2 pane (0,1,2). Any way to do this yet? just for example:

             file > Move > c:\downloads
                               c:\temp
Title: Re: Qatapult
Post by: ewemoa on February 08, 2012, 08:24 PM
Congratulations on getting things to work and thanks for posting examples :)

http://www1.picturepush.com/photo/a/2772929/480/png/Volume.png?v0

Nice icon!



what about the F keys - i never go near them my self. Just a thought.

Aha -- those do seem like good candidates for folks with full-size keyboards.  I used to be a Happy Hacking Keyboard user -- and in that context, IIRC I would have needed to press modifiers to get them to work.
Title: Re: Qatapult
Post by: pigeonlips on February 08, 2012, 08:33 PM
what about the F keys - i never go near them my self. Just a thought.

Aha -- those do seem like good candidates for folks with full-size keyboards.  I used to be a Happy Hacking Keyboard user -- and in that context, IIRC I would have needed to press modifiers to get them to work.

good point. Laptop users too i guess. How about the insert key. This to me also makes sense as a logical choice. After all its function (mostly) is to overwrite whats there? I do like the idea of it being the same key to get in and out of that mode (or with esc too). 
Title: Re: Qatapult
Post by: ewemoa on February 09, 2012, 01:05 AM
[rule_4]
0_arg=FILE
2_arg=TEXT
1_lbl=Move file to
1_ico=icons\Move.png
2_lbl=C:\
cmd=cmd.exe
args=/C "move $0.path $2.text"
workdir=%d

Default to C:\ in the 2 pane, but you can "." and add a path of your choice!

Worked here too :)

If it's just for moving (and not renaming), it seems like it might be nice to be able to navigate to the destination -- so somehow leverage FILE instead of TEXT for the third pane.

For renaming, navigating to the parent folder and then entering text mode to come up with a new name might be handy.  Not sure whether this is doable at the moment though.
Title: Re: Qatapult
Post by: ewemoa on February 09, 2012, 01:26 AM
Laptop users too i guess.

Indeed!

How about the insert key. This to me also makes sense as a logical choice. After all its function (mostly) is to overwrite whats there?

It does sound logical and looks like it would work for a notebook I have, but sadly I need to press a modifier to get it to work on a Happy Hacking Keyboard.  May be that's a pretty rare case though...

I do like the idea of it being the same key to get in and out of that mode (or with esc too). 

Yes, there is a nice symmetry.
Title: Re: Qatapult
Post by: ecaradec on February 09, 2012, 05:13 PM
I hoped to see that much excitement !   :Thmbsup:

I've made a test that allows to enter text mode with '.' or 'insert' and exit with 'esc' and 'insert'. It should be an usable configuration for most people laptop or not.

The thing I'm not sure about is if the dot is a good key for entering text mode. I often type a dot when I want to filter for an extension and erroneouly enter text mode. Insert is way more convenient for me : I don't use text mode very often, and dot is a too easy key to hit for such a uncommon behavior. Get a new version to try for yourself.

I've added ' as a prefix for forcing text mode result. If you want to avoid moving down the list to select the text result, start your query by ' and it should be the first result. We could imagine other prefixes to boost some type of results if you have other ideas.

I think that it could be useful to add filter options to sources too. Sometimes I'd like to pick a folder only or a png file, path restriction etc... I think it could be doable to add that. It would be associated to rules items in my mind : you could say you want a FILE source but only folders... But it could also be a can of worms, I need to meditate about that before moving on...

Another thing I'm thinking about is restriction on the apparition of labels : If you want to create a 'resize to' function that only apply to images, you'd need a way to have it only appears on images preferably.


Title: Re: Qatapult
Post by: pigeonlips on February 09, 2012, 05:45 PM
@ewemoa
If it's just for moving (and not renaming), it seems like it might be nice to be able to navigate to the destination -- so somehow leverage FILE instead of TEXT for the third pane.

For renaming, navigating to the parent folder and then entering text mode to come up with a new name might be handy.  Not sure whether this is doable at the moment though.

Yeah that works, although it does also include shortcuts in the results. Renaming doesnt work (c:\somefile > Move to > c:\temp\someotherfile) at least with this :

0_arg=FILE
2_arg=FILE
1_lbl=Move file to
1_ico=icons\move.png
2_lbl=C:\
2_ico=icons\move.png
cmd=cmd.exe
args=/C "move $0.path $2.path"
workdir=%d

And of course there's no use of the . to include a file extension lol ! Also i finaly googled happy hacking keyboard and see you point. Not to many options there  :) that said I want one!

@ecaradec

@pigeonlips : don't invest too much on file verbs, tell me what you think about this .
I think it rocks hard. So hard that i have stopped using FARR and was pretty dependent on this must use it like hundreds of times a day.

So i'm porting over all be bits and pieaces and thought i'd share.

Some of the things below are bits i really missed from my farr setup. Mostly have found workarounds to get working in qatapult!

In terms of changed to qatapult, please only take my comments as sugesstions - its your app

Also feel free to take any of it and do with as you wish. Note its all mostly autohotkey stuff and i'm not the best with it.

------------------------ RULES ------------------------
* matching on an arg vaule as well as type to restrict what rules are displayed. This would allow more control to the user in terms of whats displayed in the middle pane. I think this would work to add more context in terms of limiting the actions you can preform. For example....
0_arg=TEXT
0_vaule="comma,separated, list, maybe"
2_arg=FILE
....
then when you use ether "comma", "separated", "list" or "maybe" you rule verb is included as well as the default.

* NUMBER as another 0_arg data type. again to help with context. I'm thinking calculater, dialing numbers etc.

* the ability to add more than one lbl so that i can add multiple entrys to a pane (thinking just the last pane so far). For example:
0_arg=FILE
2_arg=FILE
1_lbl=Set volume
1_ico=icons\volume.png
2_lbl=master
2_ico=icons\volume.png
2.1_lbl=microphone
2.1_ico=icons\microphone.png
2.2_lbl=wave
2.2_ico=icons\wave.png
cmd=C:\Program Files\Qatapult\helpers\set-vol.exe
args=$0.text $2.text
workdir=%d
so in this example i can set the volume control using something like (0 > set volume > microphone) or (100 > Set volume > wave)

------------------- CURRENT SELECTION --------------------------

Be nice if this detected text too. Ie selected text in a text editor. an example would be:

Selected text > change case > upper

Selected text > check spelling  

workaround currently is the following ahk complied. A short cut to it called "selected Text" with a nice icon

http://www.iconeasy.com/icon/png/System/Sticker%20Pack%202/Dictionary.png

; ---------------------------------------------------------------------------------------------------------
; AutoHotkey Version:   1.0.47.6
; Author:               pigeonlips
; Script Name:    text operation
; Script Function:      Change the case of a word to uppercase, lowercase, titlecase or spell check
;                       need to have aspell installed (http://aspell.net/)

#NoEnv     ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance , Force ; only want one at a time
SendMode input ; Recommended for new scripts due to its superior speed and reliability.

; whats vaild
validatearguments=upper,lower,title,spell

;get the number of arguments - need one
arg = %0%
if arg > 0
{
; whats its vaule and check its valid
case = %1%
; uncomment for deguging
;msgbox %1% and now %validatearguments%

if case in %validatearguments%
{
; call the sub to do the work
OparateOnSelectText(case)
exitapp
}
}
; goodbye crwel world!
msgbox command not known - you can use one of the following `n %validatearguments%
ExitApp

OparateOnSelectText(case)
{
; Uncomment for debuggin
;msgbox %case%

; get the window with focus
WinGet Id, Id, A

; save the old clipboard
OldClip := ClipboardAll
Clipboard =    

; Wait for Win/Alt/Ctrl to be released, or we will invoke a win + our need match.   this is a safegard
KeyWait, LWin
KeyWait, RWin
KeyWait, Ctrl  
KeyWait, Alt

; copy that word
Send ,^c            
    
; wait for it. ClipWait is for reliability.
ClipWait , 1        
    
; set the word to return
    Word := Clipboard

; transform the contents of the clipboard when upper
if case = upper
StringUpper , Word , Word

; transform the contents of the clipboard when lower
if case = lower
StringLower , Word , Word

; transform the contents of the clipboard when title
if case = title
StringLower , Word , Word , T

if case = spell
{ ; alittle more to do now

; set up a tempary file to use
TmpFile = %TEMP%\SpellCheckerTmp.txt
FileDelete %TmpFile%

;dump the contents of the clipboard to a temp text file
FileAppend %Word%, %TmpFile%

;run aspell
Run C:\Program Files\Aspell\bin\aspell.exe check "%TmpFile%"

;focus then wait for the cmd to close
WinWaitActive ahk_class ConsoleWindowClass
WinWaitClose ahk_class ConsoleWindowClass

; read in the correct word
FileRead Word, %TmpFile%
}

;focus the orginal application
WinActivate ahk_id %Id%
WinWaitActive ahk_id %Id%

; paste the new clipboard vaule
Send , %Word%

;replace the contents of the clipboard back to what it was
Clipboard := OldClip
}

then the following rule:

0_arg=FILE
2_arg=text
1_lbl=Change Selected Text
1_ico=icons\window.png
cmd=C:\Program Files\Qatapult\helpers\ian-Changetext.exe
args=$2.text
workdir=%d

works like :

selected text > Change selected text > UPPER
selected text > Change selected text > LOWER
selected text > Change selected text > TITLE
selected text > Change selected text > SPELL

------------ ACTIONS ON WINDOWS ----------------

Switching to an open window would be nice. I do this in FARR alot as aposed to Alt-Tab. My workaround for the moment is the following ahk script complieted

icon http://images-3.findicons.com/files/icons/1676/primo/128/windows.png

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetTitleMatchMode RegEx
WinActivate, i)%1%
then useing this rule
0_arg=TEXT
1_lbl=Switch to window
1_ico=icons\window.png
cmd=C:\Program Files\Qatapult\helpers\ian-switchapp.exe
args=$0.text
workdir=%d
be nice if this was native and displayed a list of open windows Somthing my workaround doesnt do :(

Also Minimize and maximise would be sweet but i guess most keyboard junkies kow the shortcuts for this anyway.

Finaly the last one while on the shortcuts topic is to be able to interact with an application. I never remeber the shortcuts for all the apps i use (and sometimes they differ from app to app). So ....

again complied version of this ahk script:

icon used http://www.marketinggt.com/images/keyboard.png


; ---------------------------------------------------------------------------------------------------------
; AutoHotkey Version:   1.0.47.6
; Author:               Ian
; Script Name: Keygram
; Script Function:      sends key-combo to application based on a word
; Todo nice to have a command list. not sure how to show it. You can get a list using ini_ReadSections(iniFile,application)

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance , Force ; only want one at a time

; set up the global settings
applicationName = keygram
iniFile = %A_ScriptDir%\%applicationName%.ini

; read global settings from ini
vaildcommands := ini_ReadSections(iniFile,"")
keydelay := ini_Read(iniFile, "keygram", "keydelay")
SendMode := ini_Read(iniFile, "keygram", "mode")
SetKeyDelay := keydelay
; get the active application exe name - unless the window id is passed in ldialater we will assume its the active window
winget , application, ProcessName, A
winget , applicationid, ID, A
;get the number of arguments - need just one
args = %0%


; ------------------------------------------------------------------------------------------------------------------------------------------
if args > 0
{
Loop, %args%  ; For each argument:
{
;split the argument with = ie KEY=VAULE
stringsplit,argumentitem, %A_Index%, =
; uncomment below for debugin!
;msgbox %argumentitem1% = %argumentitem2%

; there is no case statement in ahk scripts so i'm using labels instead.
If IsLabel("case-" . argumentitem1)
{
Loop 1
{
  Goto case-%argumentitem1%  
  case-window:
; If its a  number we are probably looking for the HWND id
if argumentitem2 is integer
{
winget , application, ProcessName, ahk_id %argumentitem2%
winget , applicationid, id, ahk_id %argumentitem2%

}
; not a number - lets look for the title!
else
{
SetTitleMatchMode RegEx
WinActivate, i)%argumentitem2%
; get the windows process name. Thought this would be best.
winget ,application,ProcessName, A
winget ,applicationid, id, A
}
; uncomment below for debugin!
;msgbox %application% id is %applicationid% > got it from %argumentitem2%
break
  case-command:
command = %argumentitem2%  
break
  case-bonusbite:
bonusbite = %argumentitem2%
break
}
}
}
}
; ------------------------------------------------------------------------------------------------------------------------------------------

; now for the main logic - running the command

if command in %vaildcommands%
{
; check theres a match for the application
keycombo:= ini_Read(iniFile, command, application)
;if theres no match i get ERROR
if keycombo = ERROR
{
; theres no match now too look up fallback (use for "all" applications)
keycombo:= ini_Read(iniFile, command, "all")
;still no match
if  keycombo = ERROR
{
; ask user if it should be added
msgbox 4,, %application% is not on the list for %command%. Want to add it?
IfMsgBox No
exitapp
; ask for the key combo to use
KeyCombo := ask_ForKeyCombo()
; add it to the ini file
ini_Add(iniFile, command, application, KeyCombo)
}
}
; send the keycombo
WinActivate , ahk_id %applicationid%
Send , %keycombo%
}
else
{
msgbox 4, %command% not understood, Do you want to use the learing wizard to add it?
IfMsgBox Yes
LeanCommand(command, iniFile)
}
; if theres anything else to send then send that too - send it RAW baby!
if bonusbite !=
{
WinActivate , ahk_id %applicationid%
sendraw %bonusbite%
}

LeanCommand(command, iniFile) ; *******************************************************************************************
{
; welcome message
msgWizardWelcome := msgWizardWelcome()
msgbox 64, learn wizard, %msgWizardWelcome%
; get the name of the command
InputBox, command, learn wizzard, name you want to call this command?,,,,,,,,%command%
; start with the last found windows we can use this as a default, in case its right!
WinGetActiveTitle, Title
; get the application
Application := ask_ForApplication(Title)
; now to get the keycombo
KeyCombo := ask_ForKeyCombo()
; write it to the ini file
ini_Add(iniFile, Command, Application, KeyCombo)
; let the user know
msgbox ,You learn something new very day!, When you have "%Application%" focused in future and say "%Command%" i'll send "%KeyCombo%" to it!
}

ini_Create(file) ; *************************************************************************************************************
{
; create a default ini file. with default vaules
iniWrite , 500 , %file% , keygram , KeyDelay
iniWrite , Input , %file% , keygram , Mode
; now some comments
FileAppend ,  `;  Mode     - can be "Event" "Input" "InputThenPlay" or Play `n,  %file%  
FileAppend ,  `;           see http://www.autohotkey.com/docs/commands/SendMode.htm `n,  %file%  
FileAppend ,  `;  KeyDelay - Sets the delay that will occur after each keystroke. Doesnt apply if mode is "Input" `n,  %file%  
FileAppend ,  `;           see http://www.autohotkey.com/docs/commands/SetKeyDelay.htm `n,  %file%
FileAppend ,  `n,  %file%
FileAppend ,  `; For a list of key vaules this ini file uses look at `n,  %file%
FileAppend ,  `; http://www.autohotkey.com/docs/commands/Send.htm#SendPlay `n,  %file%
}

ini_Read(file, section, key) ; *************************************************************************************************
{
; if theres no file create a blank one with default settings
IfNotExist , %file%
ini_create(file)
;read the ini file and return key
iniRead, value, %file%, %section%, %key%
; return the vaule
return value
}

ini_Add(file, section, key, vaule) ; *******************************************************************************************
{
; this will also write the file if it doesnt exist. Lets hope the file passed in is Correct!
iniWrite , %vaule% , %file% , %section% , %key%
}

ini_ReadSections(file, application) ; *******************************************************************************************************
{
; clear the var
sections :=
;loop - reads the ini file
Loop, Read, %file%
{
 ; look for lines that start with [ and end with ]
      If (SubStr(A_LoopReadLine, 1, 1) = "[") and (SubStr(A_LoopReadLine, 0, 1) = "]")
 {
; take off first char and last char - should be [ and  ]
StringTrimLeft , newSection , A_LoopReadLine , 1
StringTrimRight , newSection , newSection , 1
; add this to the list obmit the "keygram" setting
if newSection != keygram
{
; if we passesd in an application lets only show sections vaild for that!
if application
{
msgbox i fire with %application%
VaildForApplication := ini_Read(file, newSection, application)
if VaildForApplication = ERROR
{
; found nothing for that application, but what about "all" thats vaild right!
VaildForApplication := ini_Read(file, newSection, "all")
if VaildForApplication != ERROR
sections := newSection . "," . sections
}
else
{
; found a match for my application
sections := newSection . "," . sections
}
}
; no application - lets retrun all vaild sections!
else
{
sections := newSection . "," . sections
}
}
 }
}
; remove the last ","
StringTrimRight , sections , sections , 1

; return the list
return sections
}


ask_ForKeyCombo() ; *************************************************************************************************************
{
msgKeyCombo := msgKeyCombo()
; now to get the action
InputBox, KeyCombo, learn wizzard, %msgKeyCombo%
; correct modifer keys ie user wants "!" but gets alt
StringReplace, KeyCombo, KeyCombo, !,{!}, All
StringReplace, KeyCombo, KeyCombo, #,{#}, All
StringReplace, KeyCombo, KeyCombo, +,{+}, All
StringReplace, KeyCombo, KeyCombo, ^,{^}, All
; correct modifer keys ie user wants Alt but gets "!"
StringReplace, KeyCombo, KeyCombo, {Ctrl},^, All
StringReplace, KeyCombo, KeyCombo, {Win},#, All
StringReplace, KeyCombo, KeyCombo, {Shift},+, All
StringReplace, KeyCombo, KeyCombo, {Alt},!, All
; all done and now for the results
return KeyCombo
}

ask_ForApplication(title) ; **********************************************************************************************************
{
; get the application for the command - lets loop through this process untill the user is happy
loop
{
; show an input box for the user to select the application
msgApplication := msgApplication()
InputBox, Title, learn wizzard, %msgApplication%,,,,,,,,%Title%
; if the application title entered was all lets get out of here and just return that!
if title = all
break
; not all - keep at it - foucus the user selected application
SetTitleMatchMode RegEx
WinActivate, i)%Title%
; get the windows process name. Thought this would be best.
winget ,application,ProcessName, A

; now flash the window
hWnd := WinActive( "A" )
Loop 4
{
DllCall( "FlashWindow", UInt,hWnd, Int,True )
Sleep 500
}
DllCall( "FlashWindow", UInt,hWnd, Int,False )
; ask to confirm that we got the right window
msgbox 4,learn wizard, did the application window you want flash? If not quick tip - click on it now to give it focus. then click no. I'll try and guess it!
IfMsgBox Yes
break
}
; return the application
return application
}

msgWizardWelcome() ; ******************************************************************************************
{
msgWizardWelcome =
(
This wizard will help me learn a new command for you
=====================================================
You are going to need 3 things

#> name                 = a name to call this command.
#> application          = the application you would like to apply an action too.
#> key combination      = the input to send to this application. A shortcut for example or a signature.

To work out the windows label for you application, please open that application or focus it before you click ok!

if your application is open - click next to continue!
)
return msgWizardWelcome
}
msgKeyCombo() ; ************************************************************************************************
{
msgKeyCombo =
(
Type in the key combination below
=======================================
some notes - special keys include:
   {F1} - {F24} or  {Numpad0} - {Numpad9}
   {Enter} {Esc} {Tab} {Backspace} {Delete} {Insert} etc
   {Ctrl} {Alt} {Shift} {LWin} etc
see http://www.autohotkey.com/docs/commands/Send.htm for more.
)
return msgKeyCombo
}

msgApplication() ; ************************************************************************************************
{
msgApplication =
(
Apply this all Applications
-----------------------------
in the input box below use the word "all"

Use the title of the application
---------------------------------
look at the title bar of the application.
Type some of it in here (doesnt need to be all of it but the more the better!).
I'll focus it and make it flash - you can tell me if i got the right one!
)
return msgApplication
}

then this rule:

0_arg=TEXT
2_arg=TEXT
1_lbl=Keygram
1_ico=icons\keyboard.png
2_lbl=
cmd=C:\Program Files\Qatapult\helpers\keygram.exe
args=command=$0.text bonusbite=$2.text
workdir=%d

works like (with say notepad++ open and focused):

new > keygram > hello world

to test add this to the keygram.ini

[new]
notepad++.exe=^n
WINWORD.EXE=!fnln


It feels like i have been typing forever and just noticed you have posted again. I'll also shut up for a bit as i feel i'm kinda spamming the board. Don't mean to - just super excited about qatapult.

I cannot say it enough. Thanks for the app. Its shaping up really nice. Love it and the direction your taking it.
Title: Re: Qatapult
Post by: pigeonlips on February 09, 2012, 05:54 PM
cannot help my self:

I've added ' as a prefix for forcing text mode result. If you want to avoid moving down the list to select the text result, start your query by ' and it should be the first result. We could imagine other prefixes to boost some type of results if you have other ideas.

makes the above workarounds easyer for me to use. I was getting hard work hitting arrow down, end  ;D

Thanks!

I think that it could be useful to add filter options to sources too. Sometimes I'd like to pick a folder only or a png file, path restriction etc... I think it could be doable to add that. It would be associated to rules items in my mind : you could say you want a FILE source but only folders... But it could also be a can of worms, I need to meditate about that before moving on...

are you thinking like the modifier keywords in FARR? Always thought that was cool. great when you have a supper large set of things indexed.

Another thing I'm thinking about is restriction on the apparition of labels : If you want to create a 'resize to' function that only apply to images, you'd need a way to have it only appears on images preferably.

sounds great.  :Thmbsup: Anything that adds smarts to whats displayed in the verb (middle) pane i think is what really will set this app appart from all the others out there!
Title: Re: Qatapult
Post by: ewemoa on February 09, 2012, 05:58 PM
I've made a test that allows to enter text mode with '.' or 'insert' and exit with 'esc' and 'insert'. It should be an usable configuration for most people laptop or not.

May be this will finally teach my body where the Insert key is -- it's quite a stretch for my pinky though for the desktop keyboard :)

On a side note, would it be hard to make some of the hotkeys configurable?  If it were easy, may be we could try out various possibilities and report back on our experiences.  I'm interested in trying out pigeonlips' idea about using the function keys -- I suppose I can try to hack together an AHK script to "reroute" function keys to other keys.

The thing I'm not sure about is if the dot is a good key for entering text mode. I often type a dot when I want to filter for an extension and erroneouly enter text mode. Insert is way more convenient for me : I don't use text mode very often, and dot is a too easy key to hit for such a uncommon behavior. Get a new version to try for yourself.

Typing a dot to filter for an extension sounds nice -- hadn't tried that.

It's sounding more and more like dot isn't such a good choice for text mode.  I guess QS also supported single quote -- for reference, that's mentioned on page 22 of the manual and it's how I remember it too.

If you think it might help, there is an old Mac Mini sitting around with some version of QS installed -- may be I can see if it will still work to do some testing.
Title: Re: Qatapult
Post by: pigeonlips on February 09, 2012, 06:41 PM
I've added ' as a prefix for forcing text mode result. If you want to avoid moving down the list to select the text result, start your query by ' and it should be the first result. We could imagine other prefixes to boost some type of results if you have other ideas.

hummm - finding that its defaulting to text straight away. While great at first (was testing all my free text stuff) it was great, but now noticed that you have to complete the whole word for a match. (or hit arrow down).

Not sure if that was you intention?


Title: Re: Qatapult
Post by: ewemoa on February 09, 2012, 07:55 PM
pigeonlips:

I hope to take a look at what you've posted once I have access to a running Windows environment again :)



all:

The local Mac Mini with QS on it decided to cooperate so I got some screenshots and did some testing.

QS window (with some customization to show current date / time)

[ You are not allowed to view attachments ]

QS window with text mode

[ You are not allowed to view attachments ]

Note: I didn't find QS to become a single pane when entering text mode.

While trying out pigeonlips' Move-related functionality, I was editing the third pane content in text mode, and it felt like it might be nicer to be able to see the other panes while doing that editing (currently switching to text mode shows an expanded pane, right?).

I remember seeing QS' window expand and contract, but I'm thinking this might have been for growing / shrinking between 2 and 3 panes.

Any thoughts?
Title: Re: Qatapult
Post by: ewemoa on February 09, 2012, 08:00 PM
------------------- CURRENT SELECTION --------------------------

Be nice if this detected text too.

Yes, please!
Title: Re: Qatapult
Post by: pigeonlips on February 09, 2012, 08:09 PM
While trying out pigeonlips' Move-related functionality, I was editing the third pane content in text mode, and it felt like it might be nicer to be able to see the other panes while doing that editing (currently switching to text mode shows an expanded pane, right?).

I remember seeing QS' window expand and contract, but I'm thinking this might have been for growing / shrinking between 2 and 3 panes.

Any thoughts?

I kinda see the benefit of both. If its large then you get more room to type/edit which is nice.

If its just in the one pane then you can see whats in you other panes as you said - also sounds nice. As i'm stuck on the fence with this one i'll sit out. Ether works well for me.

The one thing that does bother me a little is the position of the drop down box in the second and third pane. I'd rather see it expand the whole size of qatapult.

You could always algin the text (left, center, right) in it if people feel its not clear with pane its related to.


(http://img607.imageshack.us/img607/4338/qatapultdropdowntofarri.jpg) (http://imageshack.us/photo/my-images/607/qatapultdropdowntofarri.jpg/)
Title: Re: Qatapult
Post by: ewemoa on February 09, 2012, 09:07 PM
The one thing that does bother me a little is the position of the drop down box in the second and third pane. I'd rather see it expand the whole size of qatapult.

Interestingly, in the QS Manual on page 10 it shows what you describe for 2 panes (i.e. expanding to the width of both panes).  However, for 3 panes, on page 8, it shows something similar to how Qatapult currently seems to behave...

link to modified QS manual
BTW, modified the QS manual to make navigation easier (now has table of contents which may be viewable as a side pane in some PDF viewers):

  https://www.donationcoder.com/forum/index.php?topic=28713.msg272276#msg272276 (https://www.donationcoder.com/forum/index.php?topic=28713.msg272276#msg272276)

Title: Re: Qatapult
Post by: ewemoa on February 10, 2012, 04:05 AM
Some minor points I noticed:



This works:

[rule_2]
0_arg=TEXT
1_lbl=Large Type
1_ico=icons\LargeType.png
cmd=..\AutoHotkey_L\AutoHotkey.exe
args=LargeType.ahk "$0.text"

but this doesn't:

[rule_2]
0_arg=TEXT
1_lbl=Large Type
1_ico=icons\LargeType.png
cmd=..\AutoHotkey_L\AutoHotkey.exe
args="LargeType.ahk" "$0.text"

I'm guessing the double quotes in the args= line might be relevant.

I'll try to attach the script and icon at the end of this post.

As a side note, in the cmd= line, referencing an AHK_L exe allows us to not bother with compiling scripts -- this may be more convenient during testing / development.  This may work with AHK Basic too, but I haven't tried that.

Also, IIRC, using mpress.exe, AHK_L's exe can be made between 300 and 400 kB so it's not so bad in terms of file size from the perspective of a potential user -AND- AHK doesn't need to be installed (it's "portable").  So the AHK exe can just sit in the same directory as Qatapult.exe.  For users who don't mind obtaining AHK's exe but don't want to install it (e.g. weird people like myself) may be this is a viable option.

Thanks to pigeonlips' examples -- they were helpful in working out the above example.



Any chance there'd be a way to get settings.ini reread conveniently?  Right now I quit Qatapult using 'Quit' and then start it again.  Is there already a "Reload" or "Restart" command?  Or may be there is already some good way to manage that I missed :)



I appreciate the support for relative paths in settings.ini.  Thanks!

On a related note, I tried to use environment variables but didn't have much luck.  Is that something that is supposed to work?



Sorry if I missed it, but is there a way to set a font?  I don't see a setting in the generated settings.ini.
Title: Re: Qatapult
Post by: ecaradec on February 10, 2012, 04:13 PM
finding that its defaulting to text straight away
That's definitly a mistake. It should still be the last result unless you add a '
Fixed !

There is a ton of new ideas, I've read them. I'll take the time to answer later ;) it's time for relaxing and medition tonight
Title: Re: Qatapult
Post by: ewemoa on February 10, 2012, 09:03 PM
BTW, I have an almost working "Calculate".

How to display the results though...

The current testing version has code for:


The paste method doesn't work so well at the moment -- somehow, dots get lost so what should come out as:

  0.750000

results in:

  0750000

In either case, the result of calculation is not (easily?) selectable for use elsewhere -- some motivation for making things selectable in Qatapult panes? :)

May be there could be a way to pass a running Qatapult instance some data to display -- perhaps via some command line invocation?
Title: Re: Qatapult
Post by: ecaradec on February 11, 2012, 09:59 AM
Are you actually pasting text into qatapult or sending it in some way via autohotkey ? If you send it as char it would be as if you hit the . key, and as qatapult is doing some special use with it it doesn't work. Autohotkey also has special send commands that behave differently, one of them might work better...
Title: Re: Qatapult
Post by: ewemoa on February 11, 2012, 05:08 PM
Are you actually pasting text into qatapult or sending it in some way via autohotkey ? If you send it as char it would be as if you hit the . key, and as qatapult is doing some special use with it it doesn't work. Autohotkey also has special send commands that behave differently, one of them might work better...

Tried a few of the Send* commands without much success.  If none of them work, may be I'll try pasting.
Title: Re: Qatapult
Post by: ewemoa on February 11, 2012, 08:58 PM
None of the following worked:


However, doing the following first does:

Code: Autohotkey [Select]
  1. Send, .
  2.     Send, {BackSpace}

Pasting seems to work fine.
Title: Re: Qatapult
Post by: ewemoa on February 11, 2012, 09:10 PM
Here's what Calculate usage looks like now:

Division
[ You are not allowed to view attachments ]
[ You are not allowed to view attachments ]

Trig
[ You are not allowed to view attachments ]
[ You are not allowed to view attachments ]

The implementation uses AutoHotkey.dll -- the text is just evaluated by AHK.
Title: Re: Qatapult
Post by: ewemoa on February 12, 2012, 03:00 AM
Is there some way to input newlines / CRs in text mode?  It looks like pasting text with them works.

If there isn't a way already and it's worth doing, may be some modifier + Enter?  I think I've seen Alt+Enter as well as Shift+Enter.

Not sure how multiple lines might end up working when using text values as arguments though...may be temporary files might be used for communication to / from Qatapult?
Title: Re: Qatapult
Post by: ecaradec on February 12, 2012, 05:02 AM
Wow ! Very impressive ! The integration is awesome, especially considering what you have access to. Yes a shift+enter is totally possible for entering new lines. I'll probably use it for the email as well : taking the first line as the object and the rest as the body.
Title: Re: Qatapult
Post by: ecaradec on February 12, 2012, 02:21 PM
I've added a few things we've been talking about :

- The biggest thing from a user point of view is that the format of the settings file changes to an xml format. It will make the structure easier to maintain instead of putting indices everywhere. Your old settings.ini file won't load anymore, you'll have to replace it with the settings.xml provided.
- Very simple plugins can be created. Actually it's just what could be done within the settings.ini file but qatapult will now load  plugin.xml files from the plugin folder. That will make rules easier to share as we'll be able to distribute them as a single zip file. You can add executables and icons you need in the same folder. I've included the ewemoa largetype plugin as an example.
- A reload command can now reload all the config file without quiting and restarting qatapult
- You can now add new line in text by pressing shift+enter
- You can now add multiples items when you're using lbl+ico items. You can differentiate between the one that are selected with the $x.text variable
- There is now a WINDOW source that list the currently active windows that can be queried for $x.title and $x.hwnd. I haven't made any rule with those, but there is probably a ton of uses

I've changed the internal structure of the command, as this can impact a lot of things there might be a few bugs in this version. These kinds of changes are hard to test, I'll be happy if you can report about that too ;)
Title: Re: Qatapult
Post by: ewemoa on February 12, 2012, 03:59 PM
Thanks for the update :)



- A reload command can now reload all the config file without quiting and restarting qatapult

Hurray!  It's working nicely.



- You can now add new line in text by pressing shift+enter

This works here too :)

I noticed that the cursor position advances to the right by one after Shift+Enter instead of to the next line.  Does that happen there too?



- There is now a WINDOW source that list the currently active windows that can be queried for $x.title and $x.hwnd. I haven't made any rule with those, but there is probably a ton of uses

I have a use in mind but haven't figured out how to use this appropriately yet.  To test this out, what should I try to populate the first pane with?



I'd like to be able to clear the content of the current pane -- is there a recommended way of doing so without using multiple presses of Backspace or Delete?



I converted Calculate to the new format.  I also made a not-directly-usable "plugin" to collect the shared AutoHotkey pieces.  It's a folder inside the plugins directory named AHK and it contains:


The contents are referenced by local versions of Calculate and LargeType.  Below is what LargeType's plugin.xml file looks like here.

Code: Text [Select]
  1. <settings>
  2.     <rules>
  3.         <rule>
  4.             <arg>TEXT</arg>
  5.             <arg>
  6.                 <item>
  7.                     <lbl>Large Type</lbl>
  8.                     <ico>plugins\LargeType\LargeType.png</ico>
  9.                 </item>
  10.             </arg>
  11.             <cmd>plugins\AHK\AutoHotkey.exe</cmd>
  12.             <args>plugins\LargeType\LargeType.ahk "$0.text"</args>
  13.         </rule>
  14.     </rules>
  15. </settings>

time to...
search DC forums for some convenient XML editors may be :)

Title: Re: Qatapult
Post by: pigeonlips on February 12, 2012, 05:59 PM
Quote from: ecaradec on Today at 02:21:20 PM
- A reload command can now reload all the config file without quiting and restarting qatapult

Not working for me. It disapears but in the task manager its remains and the PID doesnt change. It then seems to Hang. (or i can not summon it again).

Also the quit feature doenst work for me ether now where it did before. I have to stop it via the task manager now. On win XP. Might be something about my machine. Not sure.

This works here too

I noticed that the cursor position advances to the right by one after Shift+Enter instead of to the next line.  Does that happen there too?

Also advances to the right by one char. But as soon as i type its dropped to the next line. The extra space remains.
Title: Re: Qatapult
Post by: pigeonlips on February 12, 2012, 06:26 PM
- The biggest thing from a user point of view is that the format of the settings file changes to an xml format. It will make the structure easier to maintain instead of putting indices everywhere. Your old settings.ini file won't load anymore, you'll have to replace it with the settings.xml provided.

Very nice. Much easyer to use. Although i think this could be better in terms of the name's of keys: the word "arg" sounds a little indiscriminate and without the playing around in the old settings ini i would have found this hard to work out at first. Also i'm not sure how to accomplished this :

2_arg=TEXT

But all in all much better. Thanks!  :Thmbsup:

- Very simple plugins can be created. Actually it's just what could be done within the settings.ini file but qatapult will now load  plugin.xml files from the plugin folder. That will make rules easier to share as we'll be able to distribute them as a single zip file. You can add executables and icons you need in the same folder. I've included the ewemoa largetype plugin as an example.

Sweet - makes packaging em up nice and easy. Thanks. I like this alot.


- You can now add multiples items when you're using lbl+ico items. You can differentiate between the one that are selected with the $x.text variable

Sweet! works nice. Here's an example!

extract to plugins folder

volume.zip - 239.2 KB (http://uploading.com/files/d7b5bf24/volume.zip/)

if you just want to see how to add em click here:

Spoiler
<settings>
    <rules>
        <rule>
            <arg>TEXT</arg>
            <arg>
                <item>
                    <lbl>Volume</lbl>
                    <ico>plugins\volume\volume.png</ico>
                </item>
            </arg>  
            <arg>
                <item>
                    <lbl>MASTER</lbl>
                    <ico>plugins\volume\volume.png</ico>
                </item>
<item>
                    <lbl>MICROPHONE</lbl>
                    <ico>plugins\volume\volume.png</ico>
                </item>
<item>
                    <lbl>WAVE</lbl>
                    <ico>plugins\volume\volume.png</ico>
                </item>
            </arg>
            <cmd>plugins\volume\volume.exe</cmd>
            <args>$0.text $2.text</args>
        </rule>
    </rules>
</settings>


Also here's the ahk if you prefer to an uncomplied version (and or) modify to suit your needs!

Spoiler

; AutoHotkey Version: 1.0.47.6
; Language:       English
; Platform:       Win9x/NT
; Author:         Ian
;
; Script Function:
; standalone exe to control the system volume.
;   intended to be used with autohotkey
; Use:
; SetSound.exe [NewSetting] [ComponentType] [ControlType] [DeviceNumber]
; Options
; NewSetting [REQUERED]
;     Percentage number between -100 and 100 inclusive (it can be a floating point number or expression).
; If the number begins with a plus or minus sign, the current setting will be adjusted up or down by the indicated amount.
;
; ComponentType [OPTIONAL]
; If omitted or blank, it defaults to the word MASTER. Otherwise, it can be one of the following words:
; MASTER (synonymous with SPEAKERS),
; DIGITAL,
; LINE,
; MICROPHONE,
; SYNTH,
; CD,
; TELEPHONE,
; PCSPEAKER,
; WAVE,
; AUX,
; ANALOG,
; HEADPHONES,
;
; ControlType [OPTIONAL]
; If omitted or blank, it defaults to VOLUME. Otherwise, it can be one of the following words:
; VOLUME (or VOL),
; ONOFF,
; MUTE,
; MONO,
; LOUDNESS,
; STEREOENH,
; BASSBOOST,
; PAN,
; QSOUNDPAN,
; BASS,
; TREBLE,
; EQUALIZER,
;
; DeviceNumber [OPTIONAL]
; If this parameter is omitted, it defaults to 1 (the first sound device), which is usually the system's default device for recording and playback.
; Specify a number higher than 1 to operate upon a different sound device.


#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SoundSet, %1%, %2%, %3%, %4%
if ErrorLevel
    MsgBox, %ErrorLevel%



There is now a WINDOW source that list the currently active windows that can be queried for $x.title and $x.hwnd. I haven't made any rule with those, but there is probably a ton of uses

going to start trying this out in a few minutes. Looking forward to this!
Title: Re: Qatapult
Post by: ewemoa on February 12, 2012, 07:48 PM
Quote from: ecaradec on Today at 02:21:20 PM
- A reload command can now reload all the config file without quiting and restarting qatapult
Not working for me. It disapears but in the task manager its remains and the PID doesnt change. It then seems to Hang. (or i can not summon it again).

I think the intention is for settings and plugins to be re-read without the running process exiting and a new one starting.  FWIW, the PID doesn't appear to change here after executing "Reload".

Also the quit feature doenst work for me ether now where it did before. I have to stop it via the task manager now. On win XP. Might be something about my machine. Not sure.

It seems to work here -- though this is with Windows 7 Pro 64-bit.
Title: Re: Qatapult
Post by: ewemoa on February 12, 2012, 08:13 PM
Here's an example!

extract to plugins folder

volume.zip - 239.2 KB (http://uploading.com/files/d7b5bf24/volume.zip/)

if you just want to see how to add em click here:

Also here's the ahk if you prefer to an uncomplied version (and or) modify to suit your needs!

Thanks for the uncompiled version.  I tried to adapt things to work here.

I may have run into a snag though.  Executing:

0'
Volume
MASTER

I get a dialog box with the text:

Mixer Doesn't Support This Component Type

May be it has something to do with the environment here being Windows 7.   Don't know if it's relevant but came across the following from the SoundSet docs (http://www.autohotkey.com/docs/commands/SoundSet.htm):

On Windows Vista or later, SoundSet and SoundGet affect only the script itself (this may be resolved in a future version). There are at least two ways to work around this:

1) In the properties dialog for the file "AutoHotkey.exe" (or a compiled script), change the compatibility setting to "Windows XP".

2) Have the script send volume-control keystrokes to change the master volume for the entire system. For example:

Send {Volume_Up}  ; Raise the master volume by 1 interval (typically 5%).
Send {Volume_Down 3}  ; Lower the master volume by 3 intervals.
Send {Volume_Mute}  ; Mute/unmute the master volume.
Title: Re: Qatapult
Post by: pigeonlips on February 12, 2012, 09:26 PM
May be it has something to do with the environment here being Windows 7.   Don't know if it's relevant but came across the following from the SoundSet docs:

bummer -
"In the properties dialog for the file "AutoHotkey.exe" (or a compiled script), change the compatibility setting to "Windows XP"."
You could try that.  Also i was quite surprised with the output of the soundcard analysis script. It explained why one or two where not working for me (on another mixer).

I might try writing a one off install script that uses the data from this to create the plugin.xml.

lol - i need to get off this outdated copy of XP.

Title: Re: Qatapult
Post by: ewemoa on February 12, 2012, 09:29 PM
"In the properties dialog for the file "AutoHotkey.exe" (or a compiled script), change the compatibility setting to "Windows XP"."
You could try that.

Thanks for the suggestion.  I'm hoping to try that when I re-establish access to an appropriate Windows environment.

lol - i need to get off this outdated copy of XP.

FWIW, although I started using Windows 7 recently, at the moment, I still prefer XP for many things.
Title: Re: Qatapult
Post by: pigeonlips on February 12, 2012, 10:35 PM
Windows working sweet too! But that said,

A) search is not that great i have one match for  Qatapult - DonationCoder.com - Chromium, but can only find it if i type an uppercase Q. No other combo works (qata, chrom, don, Don, etc)

B) the list seems really long. I won't mind this if i could filter the results with good search , but i have a million entry's for M ? no idea! Also stuff like Default IME.

(http://i44.tinypic.com/1fady1.jpg)

I know your not to blame for the choice of window title someone chooses but i would be nice to have a config global option to only return windows with a (not sure the terminanolgy but) style/state that is an active intractable state. Ie not a background app or service. etc.

I know its early stages. I'm not moaning, in fact i'm well impressed how quick you got this working!

And @ewemoa, as i'm sure he'll want to play with this too:

here is an example:
<settings>
    <rules>
        <rule>
            <arg>TEXT</arg>
            <arg>
                <item>
                    <lbl>WINTEST</lbl>
                    <ico>plugins\wintest\.png</ico>
                </item>
            </arg> 
            <arg>WINDOW</arg>
            <cmd>cmd.exe</cmd>
            <args>/K "echo $2.hwnd $2.title"</args>
        </rule>
    </rules>
</settings>

filling in the first pane is irrelevant (so long as its text)


Title: Re: Qatapult
Post by: ewemoa on February 13, 2012, 02:37 AM
Thanks for the example pigeonlips!

A) search is not that great i have one match for  Qatapult - DonationCoder.com - Chromium, but can only find it if i type an uppercase Q. No other combo works (qata, chrom, don, Don, etc)

I think this is the problem I was having -- only pigeonlips figured things out in much more detail!  I confirm this is what happens here under Windows 7 Pro 64-bit.

Knowing this I got my earlier attempt at a plugin to work -- it just sends some window to the bottom of the stack using AHK's WinSet w/ Bottom argument.

Here's what I have:

plugins\SendToBack\SendToBack.ahk
Code: Autohotkey [Select]
  1. ; icon adapted from:
  2. ;   http://rrze-icon-set.berlios.de/index.html
  3.  
  4. NArgs = %0%
  5.  
  6. Hwnd = %1%
  7.  
  8. ; XXX
  9. OutputDebug, % "Number of arguments passed in: " . NArgs
  10. OutputDebug, % "  Hwnd: " . Hwnd
  11.  
  12. WinSet, Bottom, , % "ahk_id " . Hwnd

plugins\SendToBack\plugin.xml
Code: Text [Select]
  1. <settings>
  2.     <rules>
  3.         <rule>
  4.             <arg>WINDOW</arg>
  5.             <arg>
  6.                 <item>
  7.                     <lbl>Send To Back</lbl>
  8.                     <ico>plugins\SendToBack\SendToBack.png</ico>
  9.                 </item>
  10.             </arg>
  11.             <cmd>plugins\AHK\AutoHotkey.exe</cmd>
  12.             <args>plugins\SendToBack\SendToBack.ahk "$0.hwnd"</args>
  13.         </rule>
  14.     </rules>
  15. </settings>

plugins\SendToBack\SendToBack.png should be attached
Title: Re: Qatapult
Post by: ecaradec on February 13, 2012, 05:42 AM
Hum, hum, I think that I went a bit too fast with the window thing. I really should not display the hidden windows AND check against upper case characters AND make search fuzzy. That's what happens when you develop without thinking. On the positive side, adding source is really simple now if the data are easy to get.

The other thing that is starting to annoy me is that all the types tends to land into the first pane. Do you know how QS used to solve that ? I was considering allowing only selected sources to show up in the first pane by default, then add either prefixes to enable them or alt+left/right to force select a single source. What would be the best for you ?

I noticed too that the reload and quit seems to be slightly unreliable, sometimes they work, sometimes they don't. I'm stopping the indexing thread to reload and quit now. I suppose that something is preventing the thread to stop here. You're correct when you supose that I don't restart the whole process, I just reload the rules and reread the settings files.

For the sound thing, I think you might use the nircmd thing. It seems to handle the win7/vista sound system properly.

I agree that the xml format is less readable than the .ini thing. That was one of my grip with xml. I might remove the item thing if you have a single verb to make the thing more readable :
<rule>
    <arg>TEXT</arg>
    <arg>
        <lbl>test</lbl>
        <ico>test.ico</lbl>
    </arg>
</rule>
But multi-elements pretty much require it, I'm not sure that this is a good idea.

I've the extra character when adding a return char. I suppose that it is measured as a printable character. I'll change that.

I've a bit of an issue with the left key for completion. It's not very nice with standard keyboard. I was thinking about something like ctrl+. or ctrl+! or some other easy combination. Or may be I should just start working on creating a dialog for editing shortcuts. No keys are probably going to be usable for everyone.
Title: Re: Qatapult
Post by: ewemoa on February 13, 2012, 07:47 AM
The other thing that is starting to annoy me is that all the types tends to land into the first pane. Do you know how QS used to solve that ?

What I recall at the moment is:

Encourage people not to add too much to the Catalog -- by limiting the number of sources and how many items each source contained.  For example, if there were a source for a folder, scan depth was one of the configurable properties (see pages 120-121 and 27-30 in the manual).

Another item was to apply "right-arrowing" into certain objects:

Page 30:
If Advanced features are enabled, in the Quicksilver set there is a source called Quicksilver Catalog Entries. If enabled, an item is added to the catalog for each source configured. These items have names that end with “(Catalog)”. You can select one of these items in the first pane and then type → to navigate through just that source. If you want to do this often, create a trigger. E.g., the trigger Applications (Catalog) (Show Contents) lets you search through just the applications in your catalog (well those that are found via this catalog source). While you can often do this just by typing → into an object, if you have custom sources configured (say for files of a particular project) this can be very handy.

and

Page 65:
Activate Quicksilver and select iTunes in the first pane; iTunes does not have to be running. Typing → will show a new results list of several ways to browse the iTunes library:

Recent Tracks
Show Playing Track
Browse Genres
Browse Artists
Browse Composers
Browse Albums
Browse Tracks
Music Library
all the playlists and smart playlists

If the iTunes Playlists catalog source is enabled, all of these items are also in the global catalog, i.e., available in the first pane after activating Quicksilver. However, specific songs, albums, artists are never in the global catalog, only these grouping objects are. This keeps the catalog at a reasonable size. Quicksilver startup might be slow if there’s a large iTunes library. If this is the case, consider disabling the iTunes Playlists catalog source.

From the second quote one can see that there was a way to make things available in QS without them coming up directly in the first pane.  Typically one could get at such things by first getting a kind of grouping/containing object to show up in the first pane and then "right-arrowing" into it see a list of "contained" items.

IIRC, users did express a desire for some kind of filtering-by-type while interacting with specific panes but I don't recall such a thing being implemented while I was a user.

On pages 13-14 there is:

You might not have realized this but Quicksilver shows what matches what you typed in two different ways. When first activated, Quicksilver will filter the whole catalog down to just the things that match what you typed. To be clear, the things that don’t match what you typed, are removed from the results list. However if at some point you type → or / to “go into” an object, if you type you’ll find that Quicksilver moves to (snaps to) the first item that matches what you typed alphabetically. The non-matching items are not removed. This is most apparent when browsing the file system or your iTunes library. It’s also evident when browsing a contact’s information, if you type to find their work phone number, the other information is still displayed in the results list (which is convenient). Sometimes these behaviors are known as selection as opposed to narrowing. In a results list there’s a gear menu in the top right of the window, from there you can choose these behaviors via the Search Modes sub-menu:

 Filter Results - Filters the current results list.
 Filter Catalog - Filters, but also includes the entire contents of the top-level catalog. Lasts until you type esc or activate Quicksilver again (⌃-space).
 Snap to Best - scrolls the results list to the best match but doesn’t remove non-matching
items.

May be the gear menu idea mentioned could be adapted / modified for some kind of filtering-by-type...

[ You are not allowed to view attachments ]



I noticed too that the reload and quit seems to be slightly unreliable, sometimes they work, sometimes they don't. I'm stopping the indexing thread to reload and quit now. I suppose that something is preventing the thread to stop here.

I confirmed that "Reload" and "Quit" were much slower on an XP machine.  They did eventually work, but at the speed I was experiencing, I think I'd end up opting to terminate the process and start it manually.  I have been lucky under Windows 7 so far and haven't noticed any problems with speed for "Reload" / "Quit".



Or may be I should just start working on creating a dialog for editing shortcuts. No keys are probably going to be usable for everyone.

If it's not too much work, this feature might let us try out various possibilities and perhaps the results of our experiments might be useful for deciding on some defaults :)  Personally, I think I'm fine to try to change things via the settings file as long as figuring out what the codes are for various keys can be made practical...
Title: Re: Qatapult
Post by: pigeonlips on February 13, 2012, 03:50 PM
Hum, hum, I think that I went a bit too fast with the window thing. I really should not display the hidden windows AND check against upper case characters AND make search fuzzy. That's what happens when you develop without thinking. On the positive side, adding source is really simple now if the data are easy to get.

I love how quick its moving. A half baked feature is great because i get to play with it and see where your going with it safe in the knowledge that its early days and before long the half baked feature is working great!  :Thmbsup:  :Thmbsup:  :Thmbsup:  :Thmbsup:

Thanks for letting us play along!

Quote from: ecaradec on Today at 05:42:26 AM
The other thing that is starting to annoy me is that all the types tends to land into the first pane. Do you know how QS used to solve that ?

What I recall at the moment is:

Encourage people not to add too much to the Catalog -- by limiting the number of sources and how many items each source contained.  For example, if there were a source for a folder, scan depth was one of the configurable properties (see pages 120-121 and 27-30 in the manual).

Another item was to apply "right-arrowing" into certain objects:

Not sure if i follow. Do you mean limit the results in the first pane by context? I use Linux at home and there's an app called synapse thats my default lanucher of choice. This has a clever way of filtering the results by using the arrows to move between object types (see the link. Left and Right move the results to the "Actions, Audio, Applications, all, places, documents, images, web"

http://www.webupd8.org/2011/09/synapse-launcher-028-released-with-new.html
http://lifehacker.com/5704221/synapse-is-a-super+fast-tightly-integrated-application-launcher-for-linux

I always thought this was nice. I especially liked how the ui handled this. Also prior to qatapult, i also liked FARR's way of using prefix +pics for example. In FARR you have to set these up yourself which i like for the power, and in synapse the defaults are good and you can use straight out the box. Its simple too which is great for new users.

If it where up to me (which its not) I would go for both of the above! Long term: provide a good set of defaults and make them very configurable. Also retain the prefix thing (say +audio) then the user doesn't have to hit left 4 or 5 times to get the result set they want. Make the settings GUI include a "pin to gui" for you 5 favorite contexts all the prefix to be user editable IE

Filter rule                         Filter name             Filter prefix         Pin to GUI
---------------------        -----------------    --------------    -------------------
[*.mp3,*.ogg, *.wav]        audio                     +audio              true
[http://*,www.*]              web                      +web                true

This all said, I get the impression (and think i read somewhere) that your trying to keep this as close to quicksilver as possible. If this is the plan, don't feel bad for ignoring my suggestions. I have never used QS so i really can not comment and if this is the way your going then its good that there's a clear vision. Also everyone i know thats ever used a Mac loves QS so it cannot be a bad thing!

I noticed too that the reload and quit seems to be slightly unreliable, sometimes they work, sometimes they don't. I'm stopping the indexing thread to reload and quit now. I suppose that something is preventing the thread to stop here.
I confirmed that "Reload" and "Quit" were much slower on an XP machine.  They did eventually work, but at the speed I was experiencing, I think I'd end up opting to terminate the process and start it manually.  I have been lucky under Windows 7 so far and haven't noticed any problems with speed for "Reload" / "Quit".

I have access to a very large number of networked drives. Its forever indexing. I like this feature though so this is not a gripe. It does makes perfect sense in terms of the restart. Also i have the patience of a ant so if something doesn't happen sub second i usually move to the task manager.  :-[

For the sound thing, I think you might use the nircmd thing. It seems to handle the win7/vista sound system properly.
there's a ton of ways to skin that cat. nircmd is great idea. there's a ton of things you can do with this. I say keep working on the core qatapult and allow users to create plugins for this stuff. I haven't tried to hard with the plugins just yet as i was mostly concerned with porting over all the nice features i used from other apps. I personally am more than happy for you to bundle/reuse/modify anything i get working.

incase its handy (from NIRCMD):
setvolume [device] [left-volume] [right-volume]
Set the volume level of your sound device. The [device] parameter represents the device identifier. In most cases, you should use '0' value for this parameter. Under Windows Vista, you should specify 0 for default playback device or 1 for default recording device.
The [left-volume] and [right-volume] parameters should contain a value between 0 (silence) and 65535 (full volume) that represents the volume level for left and right channels.
Examples:
setvolume 0 0 0
setvolume 0 32768 32768
setvolume 0 0xffff 0
 

I agree that the xml format is less readable than the .ini thing. That was one of my grip with xml. I might remove the item thing if you have a single verb to make the thing more readable :
....
But multi-elements pretty much require it, I'm not sure that this is a good idea.

I think your right. Leave it. One day i'm sure you'll have a nice GUI and therefore it wont matter so much. I just got confused with the args tag all over the place. Once i understand it - i dont mind what its called.  :D
Maybe just change the name of the args to <object> <verb> ..... or whatever terminological your using.

Ps i like you can get more than 3 panes. I know you might not want this, but i'm sure it will come in handy for me so time in the future.






Much Love.

Title: Re: Qatapult
Post by: pigeonlips on February 13, 2012, 07:17 PM
@ewemoa

Here's what I have:
plugins\SendToBack\SendToBack.ahk

Hope you dont mind but i took this one step further. the script is ready for the WINDOW datatype and will except HWND id or window title.

For now as the result set is too large for me to get $0.hwnd or $1.title working i have set it to use title based search using the TEXT type. Its nice as its using reg expressions to find the title. The draw back with this is that you need to know that the window is open. Currently it:

> Switchs to an open window
> Sends it to the back of the stack (hide)
> min
> max
> close.

Whoot - no more alt-tab for me!



winpult.zip - 257.8 KB (http://uploading.com/files/31276b44/winpult.zip/)

With the sound one, i think the mixer needs setting to 2. Run that soundcard analysis script you sent me the link for. Using the info in that i was alble to tweek mine to be perfect. Just needed to change the mixer for some.


Title: Re: Qatapult
Post by: ewemoa on February 13, 2012, 07:56 PM
Not sure if i follow. Do you mean limit the results in the first pane by context?

Not every object in QS could be gotten at directly by typing a string that would match that object's name -- at least not starting from a blank first (or third) pane.  Some objects one would get at via an intermediate containing / grouping object.  The containing object might be accessible by typing its name to get it into the first pane, and then one could "enter" it sort of by typing right-arrow.  One would then see a list of results that was "contained" in a sense -- and in that list of results there'd be these objects.

Imagine only being able to get at folders (but not files) in FARR or Qatapult by typing strings matching their names right after bringing up their main windows.  Files might be accessed by bringing up a containing folder and then pressing the right-arrow to start the process of navigating to a target file.

As an example in QS, the following describes a bit of what could be done with the iTunes plugin:


In this example, it may have been that the tracks that showed up in the results list could not be gotten at directly by typing their names when the applicable pane was blank to begin with.  It may have also been that "Recent Tracks" itself couldn't be gotten to without bring up the iTunes (app) object in the first pane.  Once the iTunes object was brought up, one could right-arrow into it, and one of the results was "Recent Tracks".

I'm a bit fuzzy on the details for the iTunes plugin as I didn't use iTunes much :)

Does this make more sense?



I use Linux at home and there's an app called synapse thats my default lanucher of choice.

Hadn't heard of this one -- thanks for mentioning it.  I currently use kupfer (http://kaizer.se/wiki/kupfer/) which is pretty close to QS.  I just tried building synapse but it seems to have some dependencies which may take some time to get straight.  Hope to get some direct experience soon though :)

Ah, there appear to be some relevant videos on youtube -- may be some might be worth taking a look at.



Too tired to continue at the moment.  May be I will be up to processing the rest later.



P.S. Hope to check out your further Window-related work.  Sounds good so far!
Title: Re: Qatapult
Post by: pigeonlips on February 13, 2012, 08:36 PM
Does this make more sense?

i think so - thanks. Without using QS its hard to imagine from a text description alone.  So an example might be (1st pane)

Window > arrow left > List of WINDOW objects in the first pane. then right arrow to get back out to search all again?

i'm youtubing some videos to have a look now.

PS i didn't know you could skin it. This "Showcase" looks gorgeous - if the idea behind qatapult is to port QS - port that. Dam!

http://www.youtube.com/watch?v=Rpi5Cy9AHNY&feature=related
Title: Re: Qatapult
Post by: pigeonlips on February 13, 2012, 09:15 PM
I just couldnt help myself :  :D

(http://i44.tinypic.com/r2swuw.jpg)

skin.zip - 30.7 KB (http://uploading.com/files/bfddc2e9/skin.zip/)

and with the nice reflection. Guess i need a new icon set  :P

(http://i44.tinypic.com/r2nqcp.jpg)

Title: Re: Qatapult
Post by: ewemoa on February 14, 2012, 04:51 AM
Does this make more sense?

[ ... ]  So an example might be (1st pane)

Window > arrow left > List of WINDOW objects in the first pane. then right arrow to get back out to search all again?

Nearly -- if you switch left and right, I think that's closer -- as in, right arrow to get a list and left arrow to get back out.



Regarding skins / interfaces:

Not sure if there is much more than what you've found, but in the manual posted before (https://www.donationcoder.com/forum/index.php?topic=28713.msg272276#msg272276) starting on page 23 in the Interfaces section, there is some info along with some screenshots.  What's show in the manual includes:

Title: Re: Qatapult
Post by: ewemoa on February 14, 2012, 04:54 AM
...i took this one step further. the script is ready for the WINDOW datatype and will except HWND id or window title.

Works nicely here for the most part  :up:

Attached is what I've adapted for local use (includes: toggleontop and restore with some icon and code mods).

MD5: 2ce1a2470397d3a49dd5bd43d6b08e41
Title: Re: Qatapult
Post by: ewemoa on February 14, 2012, 04:57 AM
Ps i like you can get more than 3 panes. I know you might not want this, but i'm sure it will come in handy for me so time in the future.

There is also the idea of the "action" living in the first pane for an alternative UI idea :)
Title: Re: Qatapult
Post by: ewemoa on February 14, 2012, 05:48 AM
I updated winpult-mod with some name and icon suggestions.
Title: Re: Qatapult
Post by: ewemoa on February 14, 2012, 05:49 AM
skin.zip - 30.7 KB (http://uploading.com/files/bfddc2e9/skin.zip/)

Worked nicely here  :up:

May be ecaradec will make skins more like plugins... :)
Title: Re: Qatapult
Post by: pigeonlips on February 14, 2012, 10:40 AM
I updated winpult-mod with some name and icon suggestions.

Thanks, I like it.  8)

Toggle on top ? never knew you could do that so easily, A very nice addition.
Icons = look so much better and tons more descriptive. Thanks.

with some name and icon suggestions.

bummer. I was hopping that you meant the name for the plugin. winpult is lame......

The names for the action are much clearer now, show hide was not very descriptive of what it did. Plus hide and min sound like the same idea from a users perspective. Much better choice of words. Fancy giving it a better name. At first i thought it was fun idea to end all my plugins with 'pult' (like launchys plugins foxy, calcy etc) but now i see it again, its not as funny as i thought!

May be ecaradec will make skins more like plugins...

a quick win for skining maybe is to define a directory to look for the background.png, background3.png, focus.png etc in the settings.xml and have a folder called skins?


Also i'd love a ini/xml file that includes the height, width, x, y for the controls. This way i'd get much closer to the full showcase skin. That sounds like a lot of extra work though and i'm not sure how ecaradec feels about people mucking around with the GUI.

Also don't get me wrong, i think the default skin is very nice. Also probably best to get it feature rich before something as trivial as skinning. but that showcase skin, sigh, that's nice. I wonder how much a mac is....... lol
 
Title: Re: Qatapult
Post by: ecaradec on February 14, 2012, 02:30 PM
Thanks ewemoa, I hadn't really understood what the catalogs where. It's much clearer now.

I think I can make the configuration keys easier to configure with readable name instead of keycode without too much work.

I didn't know about synapse, it looks really nice. There is a tons of apps that makes me jealous of being on Windows now... It never happened before, the world is changing.

you're trying to keep this as close to quicksilver as possible
Clearly no : we can totally differ if things can be made better. I've never used QS anyway, so most of the time, I'm just guessing
what the quicksilver choice would be. And I don't want to attract a bunch of super fans that will get upset if anything is different.
Really there can be differences.

Also i have the patience of a ant so if something doesn't happen sub second i usually move to the task manager
So I'm am

I have access to a very large number of networked drives. Its forever indexing.
Do you mean the indexing of drives takes forever OR the indexing of files on drives. I have a tons of drives at work and the indexing of drives is quite fast...

Ps i like you can get more than 3 panes
I completly assume that, there is not reason to limit that : the display is not able to handle it for the moment but all the background code works on rules of any length.

May be ecaradec will make skins more like plugins...
Sure !
Title: Re: Qatapult
Post by: ecaradec on February 14, 2012, 02:32 PM
Adding skin support is probably very simple. I'll try to solve this catalog thing first because this is an usuability thing, then I'll go for the candies ;)
Title: Re: Qatapult
Post by: pigeonlips on February 14, 2012, 02:53 PM
Do you mean the indexing of drives takes forever OR the indexing of files on drives. I have a tons of drives at work and the indexing of drives is quite fast...

I mean network shares. I have a good god dam lot of them (more than you could believe). It is supper fast at getting them all. Still a very long time for anything though. I don't notice when its done but for the first hour of use its updating at least. Its also very intrusive which is nice. it only causes a problem when i'm restarting Q regularly. If it wasn't for all the messing around with the plugins and skins i wouldn't find it a problem at all.
Title: Re: Qatapult
Post by: ecaradec on February 14, 2012, 06:04 PM
I've added the catalog thing, it's a bit hardcoded right now, so there is no way to select which items you want in the default. WINDOW only appears if you select and right arrow the window (catalog ) thing in the default catalog. The changes also makes apparent some internal sources.

I've also fuzzify most searches including windows. I also ignore the hidden windows.

And I've disabled the reload command in this version so that the quit command is working again. Reload didn't work reliably enough to be able to use it really, so I think it's best to at least have 'quit'.
Title: Re: Qatapult
Post by: ewemoa on February 14, 2012, 07:34 PM
And I've disabled the reload command in this version so that the quit command is working again. Reload didn't work reliably enough to be able to use it really, so I think it's best to at least have 'quit'.

Hmm, I don't remember it having failed here under Windows 7 Pro 64-bit...
Title: Re: Qatapult
Post by: ewemoa on February 14, 2012, 08:36 PM
BTW, any chance to have an option to have Qatapult's window display on start up of the Qatapult.exe executable?
Title: Re: Qatapult
Post by: ewemoa on February 14, 2012, 08:40 PM
WINDOW only appears if you select and right arrow the window (catalog ) thing in the default catalog.

Nice...except, after I press right-arrow and subsequently select a window, pressing TAB doesn't appear to do anything -- I expected the second pane to receive focus, but it is blank.  Am I missing something?

"Indexed Files (Catalog)" worked as expected though :)
Title: Re: Qatapult
Post by: ewemoa on February 15, 2012, 05:28 AM
Attached please find a tool to build the AHK plugin I'm using for Qatapult.

Usage:

1. Download file
2. Verify checksum
3. Extract zip file
4. Execute the contained Build.ahk file via AutoHotkey.exe -- when the process completes a dialog box should appear
5. Copy the resulting AHK directory to Qatapult's plugin directory

Progress during 4 can be seen via SysInternals' dbgview.exe.

MD5: 38a3147db23be742cbd8706f645fea4e
Title: Re: Qatapult
Post by: ewemoa on February 15, 2012, 05:32 AM
...and attached should be the Calculate plugin that uses the AHK plugin.

MD5: 07b909de57e95e2a1e56a4427d568cba
Title: Re: Qatapult
Post by: pigeonlips on February 15, 2012, 03:19 PM
@ecaradec

Been looking forward to this all night (saw the post yesterday).

quit - works very nice for me. Its instant now. No more messing about with the task manager.

catalogue - So i guess the whole catalogue thing makes much more sense to me now i can use it. I see the point that it nicly limits the results. Works very nice I can see why your focusing on it. Cannot wait to preform actions with it.

The window (catalog) one only ships with the send to back and for me it doesn't do anything.

I have some questions on the cats. Whats the Text one for . I was thinking snipits of text that could be stored.  That would be sweet for pasting signatures.
If its not this, can we get this,  :P

Why a cat for verbs - just curious.

Also i like the web cat.  be nice to have a verb to add to the web db. ie

https://www.donationcoder.com/forum/index.php?topic=29595.100 <TAB> add to web catalog

also i think theres a difference between websites i'd like to open (like a book mark to this page) and a website i'd search (like google, amazon). How about a flag in website.db for 'wantsearch' or something to distinguish between what shows in the website cat and the search with verb) - again just a thought.

Hidden windows works well now too. Thanks!


My only real gripe with the cats is that i get a little lost in it now. Sometimes i forget i'm in a cat and forget to hit right to get back into the rest of the results. Happens mostly if i tab to the next pane and back, or tab to the next pane and cancel, Then bring qataplut back up.  You could show the name of the cat at the top where updating index is. Just a thought. Sure i'll get the hang of it - bet its second nature to QS users, and i guess i'm way to use to the single text mode of FARR, executor etc.

PS - most excellent update to the version.


Also some things I've noticed,

* Select a text file in explorer.exe then [Current Selected <TAB> Edit] doesn't seem to work any more. Not sure when this happened.

* sometimes i can not use the arrow down. Hitting ESC once then arrow down seems to make this work. This was happening to me before this version. Doents happen often and can not replicate the steps. Just FYI. Will post again if i find out how to do this.

@ewemoa

downloaded and ran the QatapultAHKPluginBuilder.zip. I have no idea how to use it or what its for! lol. I'll look over the ahk code to find out.

downloading the calculate now. Have really been missing this from FARR.

Title: Re: Qatapult
Post by: pigeonlips on February 15, 2012, 03:57 PM
QatapultAHKPluginBuilder - i see now. Returns the results to Qatapult for the calculator!

Nice.

Title: Re: Qatapult
Post by: ewemoa on February 15, 2012, 05:06 PM
QatapultAHKPluginBuilder - i see now. Returns the results to Qatapult for the calculator!

I guess that means it is working :)  I have a "Run As AHK" plugin here too, but I'm not sure how useful that is.

At the moment, I think all of the other plugins here use the built AHK plugin (including the locally modified version of winpult).

Some points:


a bit of builder detail...
FWIW, the builder downloads HotkeyIt's AutoHotkey (it's basically a modified AHK_L + AutoHotkey.dll), extracts contents and puts those bits and a few others together.  So the builder provides a convenience in not having to manually assemble the AHK plugin yourself and we're not technically redistributing AHK either.

Title: Re: Qatapult
Post by: pigeonlips on February 15, 2012, 05:25 PM
Thanks. I've just been compiling my scripts. Not sure if that's a bad thing.

Heres another one i have been using a bit. I'm a bad speller and a fan of having aspell at my fingers everywhere!

ChangeText - changetext.zip - 266.5 KB (http://uploading.com/files/d9c53md8/changetext.zip/)

   You can modify the text (assuming is editable) and change it to
      be uppercase IE (some text = SOME TEXT)
      be lowercase IE (SOME TEXT = some text)
      be titlecase IE (some text = Some Text)
      spell check using aspell

Tried to make it nice and self contained like your plugins.

I use the spell bit so much i have a shortcut to the app called spell that passes in "spell" as an arg. This way no matter where i am i can just summon qatapult and type spell [enter] rather than ' <tab> modify text <tab> spell

I saw enzo change the case (it was built in i think) and thought it would be handy. I was the first real example i saw of launcher give the impression it was doing something than run an application.

enjoy.

Title: Re: Qatapult
Post by: pigeonlips on February 15, 2012, 05:37 PM
also another go with a skin

(http://i40.tinypic.com/qy8zki.jpg)

another-skin-attempt.7z - 95.4 KB (http://uploading.com/files/8738em27/another-skin-attempt.7z/)

this ones doesn't work so nice with the white text. Didn't notice it until it was done.
Title: Re: Qatapult
Post by: ecaradec on February 15, 2012, 05:54 PM
I have some questions on the cats. Whats the Text one for . I was thinking snipits of text that could be stored.  That would be sweet for pasting signatures.
'some text <TAB> add to text cat
text (catalog)  <RIGHT> Kind Regards, Ian <TAB> paste
Actually a lot of catalogs only appears because they simply existed as sources, so I just exported all of them as catalogs. I'm not sure if I'm doing any good talking about catalog and sources, because they are really the same thing. I need to restrict it a little bit to hide the bad results same for the weirds results with numbers at the end.

The pasting thing is doable, it won't be available under the text catalog though because the text catalog is actually the text source. If I added things in there they would show up in every query. The the facility can be done anyway just under another name.

also i think theres a difference between websites i'd like to open (like a book mark to this page) and a website i'd search (like google, amazon). How about a flag in website.db for 'wantsearch' or something to distinguish between what shows in the website cat and the search with verb) - again just a thought.
I agree about the distinction. We need a bookmark thing.

My only real gripe with the cats is that i get a little lost in it now
I get lost too, but I haven't played a lot with them. I need to try using them with more rules.

Select a text file in explorer.exe then [Current Selected <TAB> Edit]
Ok, I'll have a look.

sometimes i can not use the arrow down. Hitting ESC once then arrow down seems to make this work
Sometimes the ui seems to loose the focus of the keyboard for me. Is that the same bug you have ?

I've fixed the reload issue, so reload is back today. It also force the window visible at the end of the refresh, as I always refresh to see something, that makes testing easier.

Basic skin support : You can now create skins and save them under the 'skins' folder with the name you like. Select your current skin in the settings.xml under general/skin. You can check your changes with 'reload'. Share your creations ;)



Title: Re: Qatapult
Post by: ecaradec on February 15, 2012, 05:55 PM
Nice skin !
Title: Re: Qatapult
Post by: pigeonlips on February 15, 2012, 06:11 PM
Sometimes the ui seems to loose the focus of the keyboard for me. Is that the same bug you have ?

figured out how to get this to happen.

> summon qatapult (input should be blank)
> do nothing, wait for blank drop down to appear
> begin typing (list starts to load items), item appears in pane
> try arrow down.                                                                         <--------------Heres the problem - Shouldnt work (at least not for me)
                                                                                                                       Also you can tab to the next pane and back. List should still not work
> hit esc - list goes away.
> hit down - you can now select from the list.

He who hesitates........ Hardly a showstopper - just FYI.
Title: Re: Qatapult
Post by: pigeonlips on February 15, 2012, 07:50 PM
with the new version.

tested and rockin
-------------------------

> reload works sweet as a nut.
> skin support works will.

not working
------------------

> Open verb seems to be called test.

> send to back produces 'Error at line 1 - Line text: MZ(odd char) Error: This line doest not contain a recognized action
>>> thats the plugins fault though. Maybe the hwnd thats passed in has changed somehow?

> just noticed. If you paste into a pane and hit ' to add to it (or edit it in any way) the ' is added to the text. do the same with . and it works great. suspect that you just need to exclude ' aswell as . ?

> humm - only just noticed that i can not start an application with this version due to the open being gone. Opps  :D

Going back to the old version for now.

PS - please dont let all this feedback stop the regular updates! I love the updates.
Title: Re: Qatapult
Post by: ecaradec on February 16, 2012, 05:32 AM
I fixed the commands on files . I dropped a line while moving things along for the reload. Thanks for the extensive testing, that really helps  :Thmbsup:
Title: Re: Qatapult
Post by: ecaradec on February 16, 2012, 06:53 AM
By the way if you need to get an old version they are all available here : http://emmanuelcaradec.com/qatapult/bin
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 04:43 PM
Sorry, was out of town -- hope to catch up soon :)



BTW, I notice in plugin.xml there are (often?) many instances of the path to the folder that plugin.xml lives in.

Any chance we could have some kind of ability to express the path that plugin.xml lives in via a variable or something...Or perhaps the paths in plugin.xml could be relative to the folder plugin.xml lives in, so where we currently have:

Code: Text [Select]
  1. <cmd>plugins\AHK\AutoHotkey.exe</cmd>
  2. <args>plugins\changetext\changetext.ahk $2.text</args>

we might instead have:

Code: Text [Select]
  1. <cmd>..\AHK\AutoHotkey.exe</cmd>
  2. <args>changetext.ahk $2.text</args>
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 04:47 PM
I was hopping that you meant the name for the plugin.

BTW, I'm trying out the name "Window" for the plugin locally.
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 04:57 PM
I've just been compiling my scripts. Not sure if that's a bad thing.

I'm not sure there aren't some ups to not providing source, but on the side of working with source while in early stages of development or when multiple people work on something:


Just my (current) two local currency units -- regarding at least the plugin portion of Qatapult :)
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 05:21 PM
Heres another one i have been using a bit. I'm a bad speller and a fan of having aspell at my fingers everywhere!

FWIW, the version I downloaded has the following at the end of changetext.ahk:

Code: Autohotkey [Select]
  1. ;replace the contents of the clipboard back to what it was
  2.         Clipboard := OldClip
  3. }
  4.  
  5. asdasd

...so it doesn't seem to work.
Title: Re: Qatapult
Post by: ecaradec on February 16, 2012, 05:54 PM
A few new changes :
- catalogs now have a rule that allows them to be opened with enter
- test is gone (it was in the settings.xml )
- the results pane now won't go further than the right side of Qatapult and center under each position of the cursor
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 06:40 PM
By the way if you need to get an old version they are all available here : http://emmanuelcaradec.com/qatapult/bin

Thanks a lot for this!  Appreciate it  :up:
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 06:46 PM
A few new changes :
- catalogs now have a rule that allows them to be opened with enter
- test is gone (it was in the settings.xml )
- the results pane now won't go further than the right side of Qatapult and center under each position of the cursor

Verified under Windows 7 Pro 64-bit :)
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 06:49 PM
I've updated the Window (former winpult-mod) plugin -- should be attached to this post.

This update addresses the problem I was having earlier:

after I press right-arrow and subsequently select a window, pressing TAB doesn't appear to do anything -- I expected the second pane to receive focus, but it is blank.

MD5: 8d168c6b6184b6909c865c02cffbfab0
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 06:53 PM
BTW, for my local version I'm using the AHK plugin and this contains an appropriate Lib directory.  I don't know if it's helpful for this to be in the top level of Qatapult's directory as it seems to be in the current zip file -- perhaps that is now unnecessary?
Title: Re: Qatapult
Post by: ewemoa on February 16, 2012, 08:32 PM
another-skin-attempt.7z - 95.4 KB (http://uploading.com/files/8738em27/another-skin-attempt.7z/)

Was able to test -- looks nice :)

re: uploading.com
I had to train my patience a bit to try this out as I tried to download it to soon after downloading the changetext plugin :)

Title: Re: Qatapult
Post by: ewemoa on February 18, 2012, 02:41 AM
Attached should be a very primitive one-off timer plugin.

Usage:


Using this functionality, I noticed that if I set a timer and then use the Calculate action before the timer has expired, the process for the timer (AutoHotkey.exe) seems to go away so the timer never expires...

MD5: e3c36921d6e7afafa224237b96ba3634
Title: Re: Qatapult
Post by: ecaradec on February 18, 2012, 03:08 PM
That timer thing makes me think that a calendar source would be very nice. I could add pseudo-dates like tomorrow, next week, next month, etc...
Title: Re: Qatapult
Post by: ecaradec on February 18, 2012, 03:09 PM
However I tried it and haven't been able to see any displayed message... Where should it show up ?
Title: Re: Qatapult
Post by: ewemoa on February 18, 2012, 05:31 PM
It uses code similar to LargeType -- the message is supposed to show up as "lime" green text in an OSD-like manner.

For:

I get "Time is up!" after around 5 seconds.

Using dbgview.exe, I get the following output:

shellexecute 'plugins\AHK\AutoHotkey.exe' 'plugins\Timer\Timer.ahk "5" ""' ''
Number of arguments passed in: 2
  TimeStr: 5
  MessageStr: Time is up!
Parsed Seconds Value: 5
Period: 5000

Note that the AHK plugin is a dependency.
Title: Re: Qatapult
Post by: ewemoa on February 19, 2012, 03:51 AM
FWIW, tested Timer successfully with XP Pro SP3 and 7 Pro 64-bit.

I wonder what's not working...perhaps it's worth changing TimeUp to the following to see if it makes any difference:

Code: Autohotkey [Select]
  1. TimeUp:
  2. {
  3.   MsgBox, % MessageStr
  4.   Return
  5. }
Title: Re: Qatapult
Post by: ecaradec on February 19, 2012, 07:03 AM
Just forget about it. I forgot to add the ahk lib to my plugin directory. It works.

It would be very nice to combine that timer plugin with snarl https://sites.google.com/site/snarlapp/ . May be I should handle some sort of notification plugin that would handle everything about notifications so that that could be redirected to any app ?
Title: Re: Qatapult
Post by: ewemoa on February 19, 2012, 07:14 AM
May be I should handle some sort of notification plugin that would handle everything about notifications so that that could be redirected to any app ?

Sounds like an interesting idea :)

May be you will find the "Handlers" and "Notifications" sections starting on page 32 of the QS manual to be worth investigating.
Title: Re: Qatapult
Post by: ewemoa on February 19, 2012, 07:36 PM
Is there currently a way for a plugin to dynamically generate objects for Qatapult and/or provide Catalog objects?
Title: Re: Qatapult
Post by: ecaradec on February 20, 2012, 07:28 AM
Not yet. That's definitly on my list, but I'm very careful about it since unlike rules I'll need to add a real extension mecanism with dll, etc... Requesting it might accelerate the whole thing. Sources have to provide the $x.variables and I'm not completly determined on the list of thoses variables.

I've also considered various possible way of extensions, one of them would be to regularly run an executable that would index things and return them as an csv output file.

Do you have an idea of Catalog you'd like to write, or is it just an idea ? Do you know which language you'd like to use ? C,C++ probably would be first as they'd be the most flexible, but I'm not sure if that would be the best option for most peoples.

Title: Re: Qatapult
Post by: pigeonlips on February 20, 2012, 05:46 PM
@ewemoa
* If there had been problems, investigation might have been easier than working with a compiled version too as I've found being able to examine and modify source and test the results often helps in such situations.
.....
asdasd

I like the simplicity of the complied version. But i agree with all your points. I'll always include the .ahk file in the plugins folder. asdasd - guess i shouldnt be sticking strings in the script that for testing :) - lol If i wasnt compiling this wouldnt have happened!

I had to train my patience a bit to try this out as I tried to download it to soon after downloading the changetext plugin

sorry - first hit on google. Not sure how to upload an attachment to donationcode. Seems like the best place to put it so i'm glad your changing an re uploading them here. Thanks.


            
primitive one-off timer plugin.

nice thanks. "12:30 > Timer > lunch" :D\
It would be very nice to combine that timer plugin with snarl

:) - i'm a big fan of snarl. It comes with a small app called heysnarl that you can use to quick and easy leverage the api. For the timer app you could play around with this. Not tested yet but i'm sure it will work.

I have used snarl with other scripts i've written a ton of times. Normal approch for me passing in a arg for the "displaytype" and an case statement to run the notification in a msgbox, TrayTip, or Snarl.

If you want to play around with snarl : Add this bit at the top of the script:
notificationtimeout :=30
HeySnarlLocation :=path\to\heysnarl.exe ; change this to the path to hey snarl app exe

then in the TimeUp label use this:

  ; register with snarl
run "%HeySnarlLocation%" "register?app-sig=app/timer&title="Qataplut Timer"
; display definition
run "%HeySnarlLocation%" "notify?app-sig=app/timer&title="Qataplut Timer"&text="%MessageStr%"&timeout="%notificationtimeout%""
; unregister with snarl
run "%HeySnarlLocation%" "unregister?app-sig=app/timer&title="Qataplut Timer"
SoundBeep
Return







@ecaradec
the results pane now won't go further than the right side of Qatapult and center under each position of the cursor

I know its only cosmetic but i think it makes the app look nicer! Thanks.

By the way if you need to get an old version they are all available here : http://emmanuelcaradec.com/qatapult/bin

thanks :D

Do you have an idea of Catalog you'd like to write, or is it just an idea ?

* I'd like to try my hand at a paste bin type cat. IE a cat that has predifend text strings that can be pasted into the currently focused app. Think Email signatures, etc.

* also a plugin to get my bookmarks from my browser and add this to the website

Unfortunately my coding skills in a real languge are none existent. Outside a little autohotkey, vbs, python, i'm usless.

-----------------------------------------
 
is the number under the item in the drop down the weighting for relavence? just curious.

Thanks
Title: Re: Qatapult
Post by: ewemoa on February 20, 2012, 05:53 PM
Do you have an idea of Catalog you'd like to write, or is it just an idea ?

Two items I started considering are:


Do you know which language you'd like to use ? C,C++ probably would be first as they'd be the most flexible, but I'm not sure if that would be the best option for most peoples.

I confess that C / C++ / Objective C are languages I have worked hard in the past to avoid -- sometimes writing plugins in C++ / Objective C that enable use of other programming languages instead.

With the popularity of ECMAScript, I think that would be a natural candidate -- not to mention the fact that JScript comes with Windows (so potentially no additional download).  I haven't figured out if it's possible to load a DLL using JScript though.  I'm curious about V8 (and possibly node.js) but I wonder about the potential impact on the size of the host application.
Title: Re: Qatapult
Post by: ewemoa on February 20, 2012, 08:01 PM
I like the simplicity of the complied version. But i agree with all your points. I'll always include the .ahk file in the plugins folder.

I also like the simplicity of compiled things.  Perhaps there's some way to get the benefits of both in one download...not sure how though.

Appreciate your sharing the .ahk versions :up:



Not sure how to upload an attachment to donationcode.

May be this will help:

1. Press the Browse button

[ You are not allowed to view attachments ]

2. Locate an appropriate file via the resulting dialog

3. Verify the path to the file

[ You are not allowed to view attachments ]

Note there are restrictions via file extensions and file size but I usually don't find this to be a problem -- these are listed in text below the Browse button.

For other attachment capabilities, may be the following will help:

  new forum feature coded - ability to inline link attachments! (https://www.donationcoder.com/forum/index.php?topic=1996)
Title: Re: Qatapult
Post by: ewemoa on February 20, 2012, 08:09 PM
nice thanks. "12:30 > Timer > lunch" :D\

Just to clarify, the current implementation only works with expressions that represent durations from now -- not actual times, so unless you're planning to start "lunching" 12 minutes and 30 seconds from now... :)



Thanks for the Snarl tips.  I hope to take a look in more detail soon.
Title: Re: Qatapult
Post by: ewemoa on February 21, 2012, 07:14 PM
pigeonlips:

Regarding Snarl -- do you know if there are instructions for using it portably?  Or perhaps a portable version?  I haven't had much luck locating anything definite.
Title: Re: Qatapult
Post by: pigeonlips on February 21, 2012, 07:53 PM
Ok big disclaimer. This is very rough.

very very rough.

Its to import bookmarks from chromium.

You'll probably need to change the plugins.xml and also i have only tested on win xp with chromium.

It *should* add a rule to import all your bookmarks from chromium. If your a google chrome user you can possibly change line 13 in the import.vbs


Next steps are to make it work nicly, then to add support for firefox.

Firefox (from what i remember) uses SQLite too so this may be much easier.

all the same - enjoy.
Title: Re: Qatapult
Post by: pigeonlips on February 21, 2012, 09:00 PM
@ewemoa

don't think its portable. Sorry!
Title: Re: Qatapult
Post by: ewemoa on February 22, 2012, 02:04 AM
don't think its portable.

Thanks for the clarification.

It's not likely I will use Snarl at this time.  Perhaps there will eventually be a portable version...
Title: Re: Qatapult
Post by: ecaradec on February 22, 2012, 07:16 AM
I know its only cosmetic but i think it makes the app look nicer ! Thanks.
Qatapult is a very cosmetic app, so this is a good fix

I agree about the ECMAScript being the probable best choice. It would probably be JScript except if I can find a good reason not to use that if we go javascript. Beyond that it will probably be much faster that way because I've some familiarity with it ;). The annoying thing with JScript is the lack of libraries which means that I'll have to implement everything in the client, or that we'll have to rely on activexobject. I might also bind the libffi probably with a jsctypes taste to access the native api : https://wiki.mozilla.org/JSctypes

Beyond that we'll probably need a native extension mecanism that would allows more things, but as a starting point a script based thing might be powerful enough.

I'm also working on a skin thing these day. I'm a bit strugling making a system that works with various dimensions of input fields : most sources have a unique display (CONTACT looks different from FILE, or TEXT etc... ), which means that they'll need to handle drawing within variable dimensions. I'm approching a good comprise still.
Title: Re: Qatapult
Post by: ewemoa on February 22, 2012, 06:54 PM
Thanks for the status report :)

The annoying thing with JScript is the lack of libraries which means that I'll have to implement everything in the client, or that we'll have to rely on activexobject. I might also bind the libffi probably with a jsctypes taste to access the native api : https://wiki.mozilla.org/JSctypes

I agree about lack of libraries being a problem. 

Some kind of FFI as you suggest does sound like it might be a good strategic choice.



I hope that whatever choice is made, the app can remain portable.  When working with fscript.dll I often found myself looking for additional functionality -- and one route that seemed technically feasible was to get additional functionality by installing some COM-related bits.  IIRC, that often (always?) entails some kind of non-portable changes to the system via regsvr32 -- and I think that's not portable-friendly.  Do you know if this understanding is correct?
Title: Re: Qatapult
Post by: ewemoa on February 22, 2012, 07:31 PM
Its to import bookmarks from chromium.

Is the following close to what it does?

Title: Re: Qatapult
Post by: pigeonlips on February 22, 2012, 09:35 PM
yeah. In a nutshell,

VB script scraps the bookmarks file for Chrom(e|ium) looking for the name and the URL.

it strips out duff charators that cause some problems for SQLite and outputs the results into a text file in the %TEMP% folder that's formated into a sql query.

Then sqlite3.exe (bunddled commandlite tool for SQLite) runs the script and inserts data.

There are some limitations. I'm busy at the mo - but will put out another post (hopefully with some improvments) and a detailed explaination soon.

Much love.

Title: Re: Qatapult
Post by: ewemoa on February 23, 2012, 02:22 AM
ecaradec:

I edited settings.xml to try out relative paths for searchFolders (e.g. ..) and it seems like it works :)  I hope this functionality remains as it is nice for portable set-ups where the drive letter can change easily.

I don't see the corresponding entry for .. via the Options dialog and when I edit via the Options dialog, I think the entry for .. get overwritten.
Title: Re: Qatapult
Post by: ecaradec on February 23, 2012, 07:08 AM
I hope that whatever choice is made, the app can remain portable
That's the issue with relying on activex objects to bind behaviors. Windows has a lot of theses objects preinstalled, but some will need a separate installation. Implementing JSctypes would be best; it's also quite a bit of work because nobody seem to have done and published it on a JScript basis.

I tried the import.vbs. It seems to works with google chrome too, I just needed to change the path to :
bookmarkfile   =   objShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Local Settings\Application Data\Google\Chrome\User Data\Default\Bookmarks"

However Qatapult doesn't seems to know what to do with thoses types, may be that's just a bug in Qatapult. Did actions worked for you pigeonlips ?
Title: Re: Qatapult
Post by: pigeonlips on February 23, 2012, 03:31 PM
yeah it works for me. I did have to use the full path to the import.vbs script and set the working dir to be the location of the sqlite3.exe.

Qatapult doesn't seems to know what to do with thoses types

not sure what you mean. I did get the 'import bookmarks' verb in the middle pane and it ran ok. I did have to select a bookmark in the web cat first.

I'm also working on a better more simple (but maybe more helpful) plugin where you can add or delete an entry from the website.db

The problem is that need to use 4 panes to get all the details for the row:

any entry in website (cat) > add bookmark (verb) > Name > URL

it would be sweet if qataplut knew that anything in the first pane that starts with http:// is a website and inherits the verb for website type. Then i could do this.

http://some.url > Add bookmark > Name

at the moment i added an entry called new (no URL) to work around, but i still need to use 4 panes or present a dialogue to add the name. I was hoping to avoid this as it always seems a little bolt on when i have to come out of qatapult to complete an action.

 
Title: Re: Qatapult
Post by: pigeonlips on February 23, 2012, 04:59 PM
quick suggestion too - hope you dont mind.

In another launcher i used (executor) it separated the results list by what it called group which is your cats. This would be nice so that when i search for something say 'word' i can easily distinguish what it is. IE

APPLICATION
word
WINDOW
word - some open document
WEBSITE
help using MS WORD

Title: Re: Qatapult
Post by: ewemoa on February 23, 2012, 05:01 PM
Don't know if it's a good idea, but if "multiple items per pane" is implemented at some point (in QS lingo "the comma trick" -- see page 15 of the manual), may be that would be a work-around of a sorts...
Title: Re: Qatapult
Post by: ewemoa on February 23, 2012, 05:06 PM
In another launcher i used (executor) it separated the results list by what it called group which is your cats. This would be nice so that when i search for something say 'word' i can easily distinguish what it is.

It does seem like some kind of grouping of results might be nice.  Not sure what a good UI would be for it though.

I used Exector for a bit at some point too but I don't think I ended up feeling that the grouping was done well (though perhaps better than nothing?).

The following screenshot is from one of the launcher's pages (to supplement pigeonlips' description a bit):

[ You are not allowed to view attachments ]
Title: Re: Qatapult
Post by: pigeonlips on February 23, 2012, 05:08 PM
so would that be

Website (Cat) > Add Bookmark > Name , URL ?

i like it although it assumes the user knows what values need to be in each side of the comma. All the same i like it!
Title: Re: Qatapult
Post by: pigeonlips on February 23, 2012, 05:09 PM
The following screenshot is from one of the launcher's pages

thanks was just about to upload an example screen shot!
Title: Re: Qatapult
Post by: ewemoa on February 23, 2012, 05:57 PM
so would that be

Website (Cat) > Add Bookmark > Name , URL ?

i like it although it assumes the user knows what values need to be in each side of the comma. All the same i like it!

It's a bit of a hack for the current situation for sure.

To clarify, after pressing the comma key, a little icon is added below the now-shrunken pane.

FWIW, here are some images from some folks around the net:

first pane with comma trick (http://www.maclawstudents.com/blog/techniques/faster-printing-with-quicksilver/)

[ You are not allowed to view attachments ]

third pane with comma trick (http://www.usingmac.com/2007/8/22/quicksilver-the-comma-trick)

[ You are not allowed to view attachments ]
Title: Re: Qatapult
Post by: pigeonlips on February 23, 2012, 06:19 PM
nice - thanks - looks good. Them quicksliver folks know good ui :)

heres an example of (doesnt work) on how to add and delete from the website db.

you need sqlite3.exe in the plugin folder. http://www.sqlite.org/sqlite.html


<settings>
    <rules>
        <rule>
            <arg>WEBSITE</arg>
            <arg>
               <item>
                    <lbl>Add Bookmark</lbl>
                    <ico>plugins\.png</ico>
               </item>                
            </arg>  
        <cmd>plugins\Bookmarks\sqlite3.exe</cmd>
        <args>"..\..\databases\websites.db" "insert into websites values ('new','new','','','website','0');"</args>
        </rule>
        <rule>
            <arg>WEBSITE</arg>
            <arg>   
               <item>
                    <lbl>Delete Bookmark</lbl>
                    <ico>plugins\.png</ico>
               </item>         
            </arg>  
        <cmd>plugins\Bookmarks\sqlite3.exe </cmd>
        <args>"..\..\databases\websites.db" "delete from websites where display = 'new';"</args>
        </rule>          
    </rules>
</settings>

It doesnt work, and i think this is because of the "'s. @ewemoa you posted that you had this problem too - did you ever get around it. I think its the dbling up on the "". Tried all sorts.

If i can get this to work then i can replace the 'new' with $1.name and deleting at least will work.



Title: Re: Qatapult
Post by: pigeonlips on February 23, 2012, 06:33 PM
forget that last post - I'm winning:

<settings>
    <rules>
        <rule>
            <arg>WEBSITE</arg>
            <arg>
               <item>
                    <lbl>Add Bookmark</lbl>
                    <ico>plugins\.png</ico>
               </item>                
            </arg>  
        <cmd>cmd.exe</cmd>
        <workdir>plugins\Bookmarks\</workdir>
        <args>/c sqlite3.exe "..\..\databases\websites.db" "insert into websites values ('new','new','','','website','0');"</args>
        </rule>
        <rule>
            <arg>WEBSITE</arg>
            <arg>   
               <item>
                    <lbl>Delete Bookmark</lbl>
                    <ico>plugins\.png</ico>
               </item>         
            </arg>  
        <cmd>cmd.exe</cmd>
        <workdir>plugins\Bookmarks\</workdir>
        <args>/c sqlite3.exe "..\..\databases\websites.db" "delete from websites where display = 'new';"</args>
        </rule>          
    </rules>
</settings>


I win - hooray for me!

create your  plugin folder ( i called it 'bookmark')

add an icon in there called bookadd.png, bookrem.png, bookname.png and book.png

download and extract sqlite3.exe (http://www.sqlite.org/sqlite.html) to that folder.

add the plugin xml

<settings>
    <rules>
        <rule>
            <arg>TEXT</arg>
            <arg>
               <item>
                    <lbl>Add Bookmark As</lbl>
                    <ico>plugins\bookmark\bookadd.png</ico>
               </item>
            </arg>  
            <arg>TEXT</arg>
            <arg>
               <item>
                    <lbl>Bookmark Name?</lbl>
                    <ico>plugins\bookmark\bookadd.png</ico>
               </item>
            </arg>  
 <cmd>cmd.exe</cmd>
 <workdir>plugins\bookmark\</workdir>
 <args>/c sqlite3.exe "..\..\databases\websites.db" "insert into websites values ('$2.text','$2.text','$0.text','','website','0');"</args>
        </rule>
        <rule>
            <arg>WEBSITE</arg>
            <arg>
               <item>
                    <lbl>Open Bookmark</lbl>
                    <ico>plugins\bookmark\book.png</ico>
               </item>
            </arg>  
 <cmd>$0.href</cmd>
        </rule>  
        <rule>
            <arg>WEBSITE</arg>
            <arg>
               <item>
                    <lbl>Delete Bookmark</lbl>
                    <ico>plugins\bookmark\bookrem.png</ico>
               </item>
            </arg>  
 <cmd>cmd.exe</cmd>
 <workdir>plugins\bookmark\</workdir>
 <args>/c sqlite3.exe "..\..\databases\websites.db" "delete from websites where display = '$0.display';"</args>
        </rule>    
        <rule>
            <arg>WEBSITE</arg>
            <arg>
               <item>
                    <lbl>Rename Bookmark</lbl>
                    <ico>plugins\bookmark\bookname.png</ico>
               </item>
            </arg>  
   <arg>TEXT</arg>
            <arg>
               <item>
                    <lbl>Bookmark Name?</lbl>
                    <ico>plugins\bookmark\bookname.png</ico>
               </item>
            </arg>  
 <cmd>cmd.exe</cmd>
 <workdir>plugins\bookmark\</workdir>
 <args>/c sqlite3.exe "..\..\databases\websites.db" "update websites set display ='$2.text' where display = '$0.display';"</args>
        </rule>  
    </rules>
</settings>

Title: Re: Qatapult
Post by: ewemoa on February 24, 2012, 02:35 AM
I hope that whatever choice is made, the app can remain portable
That's the issue with relying on activex objects to bind behaviors. Windows has a lot of theses objects preinstalled, but some will need a separate installation. Implementing JSctypes would be best; it's also quite a bit of work because nobody seem to have done and published it on a JScript basis.

Sorry to hear it may be a lot of work...I hadn't heard of JSctypes until you mentioned it.  I doubt I'll find anything helpful, but I'm interested in finding out more :)

I don't suppose V8 / node.js is a practical option -- I was surprised to learn that MS provided some aid in the Windows port...
Title: Re: Qatapult
Post by: ecaradec on February 24, 2012, 02:39 AM
At least I have a new version ;)

It has been a bit long, there is now a simple skin system. I've designed a simple inline skin as a demo :
[ You are not allowed to view attachments ]
So you can try making a few skins with that ;). The position of text and icons inside fields is probably not pixel perfect which means it might change slightly, so you should avoid making tightly ajusted things. Qatapult automatically detect if the ratio W/H is more than 2 then it will do a inline things instead of the big icon thing.

I've also added some variables : rpath, rdirectory and rfilename that resolve links . This is useful for making cmdhere or explore commands on links, as you'd usually do not want to explore the startmenu but the linked location instead.
Title: Re: Qatapult
Post by: ecaradec on February 24, 2012, 12:41 PM
I found an interesting guide on how to develop plugins for QS : http://projects.skurfer.com/QuicksilverPlug-inReference.mdown . It goes deeper that the user manual. I found that QS maintains a list of types for objects, it might be nice to have something like that : Currently a catalog in Qatapult can only return one type of data. QS catalogs can return various types : as a example a contact might return a 'phone number','an address', etc.. all of them correctly typed. I could be very nice for declarating actions. That will also maintain types more homogeneous.

@pigeonlips : Very creative use of the sqlite commands within Qatapult. I was on the go for work and didn't really tried your command.
Title: Re: Qatapult
Post by: ecaradec on February 24, 2012, 12:55 PM
I had a look at node.js and spotted that it now has a Windows installer. The previous time I had a look it was only available on linux. Node.js would be very nice to include, as it has a lot of librairies. However its purpose is to be a server and it doesn't seems to be easily embeddable : http://stackoverflow.com/questions/5525162/how-to-embed-node-js-interpreter-into-c-c

v8 seems embedable however, I'll have a quick look if I can integrate that.
Title: Re: Qatapult
Post by: ewemoa on February 24, 2012, 08:59 PM
I found that QS maintains a list of types for objects, it might be nice to have something like that : Currently a catalog in Qatapult can only return one type of data. QS catalogs can return various types : as a example a contact might return a 'phone number','an address', etc.. all of them correctly typed. I could be very nice for declarating actions. That will also maintain types more homogeneous.

I used to think of QS' object/type idea as something like -- each type for a given object representing a different "view" or "perspective".  As an example, some object might have a view as a file on one's disk but another view of it might be the text of the full path to the file.  Is that close to your understanding?



On a related note about examining existing systems...

It used to be that QS' source code was not available and writing plugins involved trying to understand the few examples available, asking on the forums, and trying to catch the main developer on IRC.  I think the main developer felt his source code was very messy and was reluctant to release it for a while -- though he eventually did.  Following a link from the guide you posted about, I learned that QS' source code went through a fair bit of cleaning up in recent years and IIUC it is generally available.

It's probably very obvious, but FWIW, being able to interact with QS and work with its source has some hurdles -- it's written in Objective C and only builds and runs on Mac OS X.

In contrast, the Kupfer launcher seems to me a pretty close emulation of QS and though AFAIK it doesn't run on Windows, its source (Python) is available and can run on *nix -- so can be tested pretty easily via something like Virtualbox.

I've only written one plugin for Kupfer, but I found it much easier than writing plugins for QS.  I believe this has to do with Python being easier to work with for this type of thing compared to Objective C, but I think that's not the only reason.  My impression so far is that historically, Kupfer had the advantage of being able to examine how QS worked and the developer was able to avoid a lot of messiness that crept into QS' evolution.

Well...anyway :)

some kupfer plugin documentation
BTW, some plugin documentation for kupfer:

  http://kaizer.se/wiki/kupfer/PluginAPI.html (http://kaizer.se/wiki/kupfer/PluginAPI.html)

Title: Re: Qatapult
Post by: ewemoa on February 24, 2012, 11:36 PM
At least I have a new version ;)

Thanks for the new version!

I'm not sure if it's from this version or a previous one, but in the process of trying out pigeonlips' Bookmarks plugin:

[ You are not allowed to view attachments ]

After tabbing to the 3rd pane:

[ You are not allowed to view attachments ]

Pane 3 appears to be truncated.

The truncation appears to happen with the inline skin too (vertical this time):

[ You are not allowed to view attachments ]

[ You are not allowed to view attachments ]

Also inline text mode seems to lead to truncation:

[ You are not allowed to view attachments ]

This was all with Windows XP Pro SP3.
Title: Re: Qatapult
Post by: ewemoa on February 25, 2012, 12:12 AM
add the plugin xml

I changed some of the plugins\bookmark\ instances to plugins\Bookmarks\.

Renaming and opening worked here.

Although I see a DOS window come up for a moment, adding didn't work with:

Pane 1: https://duckduckgo.com/
Pane 2: Add Bookmark As
Pane 3: DuckDuckGo

I checked websites.db via SQLiteDatabaseBrowser after exiting Qatapult, and didn't see any new bookmarks.

Deleting didn't seem to work either.

This is all with Windows XP Pro SP3.
Title: Re: Qatapult
Post by: ewemoa on February 25, 2012, 07:22 AM
I had a look at node.js and spotted that it now has a Windows installer. The previous time I had a look it was only available on linux. Node.js would be very nice to include, as it has a lot of librairies.

It certainly appears to be an interesting project.

However its purpose is to be a server and it doesn't seems to be easily embeddable : http://stackoverflow.com/questions/5525162/how-to-embed-node-js-interpreter-into-c-c

It'd be nice to somehow leverage node.js -- its asynchronous programming model may take some getting used to though.  As I understand it, it's similar to Python's Twisted.

v8 seems embedable however, I'll have a quick look if I can integrate that.

That sounds interesting -- wishing you luck!
Title: Re: Qatapult
Post by: ecaradec on February 26, 2012, 03:13 PM
I reproduced you issue ewemoa : it seems related to having 4 panes query or something like that (Qatapult default to the background.png background instead of the correct length one ). I'll have a fix as soon as I can release the new version. I'm reworking code so that catalogs can output more than one type of object and other clean up things. I've moved fast, I have to pay the price a bit of it now in order to add a plugin system.

the developer was able to avoid a lot of messiness that crept into QS' evolution.
That should work for us as well ;). It's actually really helpful not having to inspect every direction to check if everything is ok in the long run.

I thought about the script integration too. I think that it'll be faster that I use JScript first. I can keep it apart enough so that we might switch latter. The main issue with V8 is that we would end up with a script engine without system connectivity : V8 doesn't comes with activexobject support of course and it would be a lot harder to write plugins without it. Anyways plugins aren't probably going to do a lot of length compute so that shouldn't be too bad.


Title: Re: Qatapult
Post by: ewemoa on February 27, 2012, 08:55 AM
Thanks for the status update and your thoughts on script integration.  Good luck with your current course of action :)



On a side note, I'm curious as to what MS is thinking (bad assumption?) about node.js / V8 in relation to JScript -- IIUC, MS worked with Joyent on the Windows port of node.js:

  http://www.zdnet.com/blog/microsoft/microsoft-joyent-deliver-first-stable-build-of-nodejs-on-windows/11178 (http://www.zdnet.com/blog/microsoft/microsoft-joyent-deliver-first-stable-build-of-nodejs-on-windows/11178)
Title: Re: Qatapult
Post by: ewemoa on February 27, 2012, 08:59 AM
Put together a rudimentary package to make it easier to get started with some of the plugins that have been posted.

Usage

  1. Execute BuildApp.exe.  Should produce plugins directory.

  2. Review content of resulting plugins directory and compare with existing
     Qatapult plugins directory.

  3. Copy resulting plugins folder (or selected portions of) to Qatapult
     installation directory.

At the moment, the produced plugins directory should include:


It's not as robust as it could be, but it's a start.

MD5: 3722fc6fd0367e004e583b9fe9e08b7c
Title: Re: Qatapult
Post by: ecaradec on February 27, 2012, 02:44 PM
Here is a new release :

- It is now possible to select sources you want to show up in the first pane or to disable them completly.
- the bad background bug detected by ewemoa should be a thing of the past too
- I enlarged the detail pane so that it match the size of the default background.png. This looks prettier imho. As you are sensible to that kind of thing, tell me you impression pigeonlips ;)
- the clock is gone, I don't think it was very useful and it was difficult to keep with the current changes. It will come back later.

Most changes are really preparation so that I can add a light plugin support in js, so there is a lot of internal changes.
Title: Re: Qatapult
Post by: ecaradec on February 27, 2012, 02:47 PM
Also I've found the Alfred app which is sort of the new hot thing among the world of keyboard launcher under mac os : http://www.alfredapp.com/powerpack/ . It looks really nice too. It's a very different presentation but I think it might be possible that I improve the skin system enough that it should be possible to make skins of that flavor under Qatapult... but hum, later ;)
Title: Re: Qatapult
Post by: pigeonlips on February 27, 2012, 06:09 PM
opps - typos in the plugin.xml - updated the post.

looking forward to trying the new version :)
Title: Re: Qatapult
Post by: ewemoa on February 27, 2012, 07:11 PM
opps - typos in the plugin.xml - updated the post.

Thanks!

Adding seems to work now :)



Removing still doesn't work for me.

Below is what I have for plugin.xml:

Code: Text [Select]
  1. <settings>
  2.     <rules>
  3.         <rule>
  4.             <arg>TEXT</arg>
  5.             <arg>
  6.                <item>
  7.                     <lbl>Add Bookmark As</lbl>
  8.                     <ico>plugins\Bookmarks\bookadd.png</ico>
  9.                </item>                                   
  10.             </arg>  
  11.             <arg>TEXT</arg>
  12.             <arg>
  13.                <item>
  14.                     <lbl>Bookmark Name?</lbl>
  15.                     <ico>plugins\Bookmarks\bookadd.png</ico>
  16.                </item>                                   
  17.             </arg>               
  18.                   <cmd>cmd.exe</cmd>
  19.                   <workdir>plugins\Bookmarks\</workdir>
  20.                   <args>/c sqlite3.exe "..\..\databases\websites.db" "insert into websites values ('$2.text','$2.text','$0.text','','website','0');"</args>
  21.         </rule>
  22.         <rule>
  23.             <arg>WEBSITE</arg>
  24.             <arg>        
  25.                <item>
  26.                     <lbl>Open Bookmark</lbl>
  27.                     <ico>plugins\Bookmarks\book.png</ico>
  28.                </item>                   
  29.             </arg>  
  30.                   <cmd>$0.href</cmd>
  31.         </rule>                    
  32.         <rule>
  33.             <arg>WEBSITE</arg>
  34.             <arg>        
  35.                <item>
  36.                     <lbl>Delete Bookmark</lbl>
  37.                     <ico>plugins\Bookmarks\bookrem.png</ico>
  38.                </item>                   
  39.             </arg>  
  40.                   <cmd>cmd.exe</cmd>
  41.                   <workdir>plugins\Bookmarks\</workdir>
  42.                   <args>/c sqlite3.exe "..\..\databases\websites.db" "delete from websites where display = 'new';"</args>
  43.         </rule>            
  44.         <rule>
  45.             <arg>WEBSITE</arg>
  46.             <arg>        
  47.                <item>
  48.                     <lbl>Rename Bookmark</lbl>
  49.                     <ico>plugins\Bookmarks\bookname.png</ico>
  50.                </item>                   
  51.             </arg>  
  52.                     <arg>TEXT</arg>
  53.             <arg>
  54.                <item>
  55.                     <lbl>Bookmark Name?</lbl>
  56.                     <ico>plugins\Bookmarks\bookname.png</ico>
  57.                </item>                                   
  58.             </arg>               
  59.                   <cmd>cmd.exe</cmd>
  60.                   <workdir>plugins\Bookmarks\</workdir>
  61.                   <args>/c sqlite3.exe "..\..\databases\websites.db" "update websites set display ='$2.text' where display = '$0.display';"</args>
  62.         </rule>            
  63.     </rules>
  64. </settings>



Attached please find a packaging of what's being tried here (includes some temporary icons).

MD5: 5cf077ccc5996420f146c3061ab77685

Title: Re: Qatapult
Post by: ewemoa on February 27, 2012, 07:25 PM
Thanks for the new release :)



- the bad background bug detected by ewemoa should be a thing of the past too

With the inline skin, I still get truncation:

[ You are not allowed to view attachments ]

Also, with the default skin I noticed evidence of a fourth pane -- may be when it is unwanted?

[ You are not allowed to view attachments ]



- the clock is gone, I don't think it was very useful and it was difficult to keep with the current changes. It will come back later.

I support this type of thinking and action -- even if you said "It MAY come back later" :)



I briefly tested:

Code: Text [Select]
  1. <settings>
  2.         <general>
  3.                 <font>MS Mincho</font>

It seems to work so far -- since J works, may be C and K will too :)



This was all under Windows 7 Pro 64-bit.
Title: Re: Qatapult
Post by: pigeonlips on February 27, 2012, 08:41 PM
$0.display was missing and while testing i had 'new' in the args bit. Corrected the post again.

Title: Re: Qatapult
Post by: pigeonlips on February 27, 2012, 10:10 PM
skinning is fun!

Title: Re: Qatapult
Post by: ecaradec on February 28, 2012, 07:00 AM
The first and the last rule in the bookmark plugin is a 4 items rule. I think that's your issue ewemoa, but I don't know what's the purpose of that 4th argument. It doesn't seem used.
Title: Re: Qatapult
Post by: ecaradec on February 28, 2012, 07:01 AM
$0.display was missing
It's possible that some $x.display miss in the last version. I replaced some by $x.text that is valuable for most kind of items : It's more standard.
Title: Re: Qatapult
Post by: ecaradec on February 28, 2012, 07:15 AM
You new skin looks awesome pigeonlips. However I feel a bit lost without a focus and your skin would require a different focus for each position of the focus.

However there is a special rule that I haven't really documented yet for background that you might use for focus. Qatapult will take the background picture whose path match :

background_(nbitems)_(focus).png

So you can make different background that include the focus by making the following backgrounds :

background_2_1.png
background_2_2.png
background_3_2.png
background_3_3.png

You won't need to include the focus anymore. You also might want to keep a background.png so that Qatapult default on it if it can't find a match.


Title: Re: Qatapult
Post by: ewemoa on February 28, 2012, 07:37 PM
The first and the last rule in the bookmark plugin is a 4 items rule. I think that's your issue ewemoa, but I don't know what's the purpose of that 4th argument. It doesn't seem used.

May be pigeonlips could clarify :)
Title: Re: Qatapult
Post by: pigeonlips on February 29, 2012, 03:04 PM
Hi all,

Yeah i can clairy. It was going to be used for the Name so like this:

Web Cat > Add to > URL > Name.

In the end i left it out in my struggle to make it work. I should now be easy to put back in. That upload was very very rough. I should have held off till it was fully finished :o

Also it would be cool if there was a way of setting a hint or something as with this approach i can not think of a way to notify the user what goes where in the GUI (IE s/he would need to know the order is > URL > NAME. ). Theres no "un-documented" way to set the text at the top (indexing) or preferably bottom (path) is there ?  :D

(http://i39.tinypic.com/2rm2jb8.jpg)


I feel a bit lost without a focus
too true. I had played around with the focus.png and as gutted i couldn't get it to work, Thanks for the tip with the backgrounds. Here's what i got (see attachment)

re-position icons and text depending on the pane your on might be cool. I really would like to try a skin that instead of focus, uses size to indicate what pane your on.

Also that Alfred link looks great. I would try replicating it (will if you want), but the bit that looks the best is the preview part on the right.

I'd love to see something like that in qatapult with thumbnails but i guess that's a pretty big feature. If your keen just having the sources (ie IndexedFiles, Filesystem, Network, Window, Web, etc would be handy as a start. Thats just an idea though.

Great new update with the release. Thanks Heaps. I think its great how much progress you are making with it. The fairy-tale is fast becoming a legend to be sung in songs of old!

Maybe the 1% will start to get jealous  :D


PS - forgot to ask - qatapult defaults to center screen - any way of configuring this. I'd like to try a skin that's at the top of the screen.
Title: Re: Qatapult
Post by: ewemoa on February 29, 2012, 08:49 PM
Also it would be cool if there was a way of setting a hint or something as with this approach i can not think of a way to notify the user what goes where in the GUI (IE s/he would need to know the order is > URL > NAME. ). Theres no "un-documented" way to set the text at the top (indexing) or preferably bottom (path) is there ?  :D

Some kind of status text does sound nice.

For comparison...

QS

[ You are not allowed to view attachments ]

Option in FARR

[ You are not allowed to view attachments ]
Title: Re: Qatapult
Post by: ewemoa on February 29, 2012, 08:52 PM
I miss the change in color of the area where the text is typed in a pane -- so it looks like a text edit field:

[ You are not allowed to view attachments ]

The subtle background is nice too -- presumably of the object's default image.

May be this will be possible at some point?
Title: Re: Qatapult
Post by: pigeonlips on February 29, 2012, 09:32 PM
@ewemoa

for the change in color - did you want it to look highlighted like the screeny above. If not i could easy knock up a skin with any color you like for text focus. (i think). One problem is that the text is white (not sure how to change that) and that there's no binding on the first pane in terms of H x W so it fills the background image.

Title: Re: Qatapult
Post by: pigeonlips on February 29, 2012, 09:45 PM
just tryed it and it looks bad. Mostly because of the white text on a pale background, also forgot but it applys to all the panes (ie free type in pane two etc)
Title: Re: Qatapult
Post by: pigeonlips on February 29, 2012, 09:54 PM
The subtle background is nice too

do you mean the transparency - i'm not following that bit

Title: Re: Qatapult
Post by: ewemoa on March 01, 2012, 01:24 AM
The subtle background is nice too
do you mean the transparency - i'm not following that bit

I think so.  The way the image came across to me was that underneath the text mode edit field was the image of a globe along with corresponding text.

Thus one gets a reminder of the object type displayed previous to entering text mode.
Title: Re: Qatapult
Post by: ecaradec on March 01, 2012, 05:36 AM
I've come to the conclusion that there is too much details and positioning issue that I can solve with automatic settings :
- the inline skin looks correct but the positioning of icons is way too approximative so that the skin looks really nice, and this will apply to every skin we can do with the current system.

What I think I'll do is to gives the control of the display to a javascript plugin, that way each skin will be able to exactly place each component of the skin where it want. It will also be able to display extra datas from the focused pane or the current rule, etc...

It could look like something like that :

function draw(gui,focus,rule) {
    if(rule.length==3) {
        drawImage("background3.png",x,h,w,y);
    } else {
        drawImage("background.png",x,h,w,y);
    }
    
    drawInput(0,0,w,h)

    drawImage("focus.png",0,50,w,y);    
    drawImage("$0.icon",0,50,w,y);    
    drawText("$0.text",0,50,w,y);    

    drawImage("focus.png",100,50,w,y);    
    ...

    drawImage("focus.png",200,50,w,y);
    ...

    drawResults(x,y,w,h);
    ...
}

The current drawing function is completly independant from the rest, so binding all of these would not be really difficult.

Title: Re: Qatapult
Post by: ecaradec on March 01, 2012, 04:40 PM
Tada ! I'm proud to say that the new version include the first part of the extension mecanism of Qatapult :

This part allows you to publish new items into Qatapult. You can read them in anything that is FAST to read. FAST is important because being slow here will impact everything you do in Qatapult.  I've attached an example that read a text file and returns results to Qatapult.The whole available api is demonstrated in the example as there is only 4 functions. You can also create your custom type by giving it a special name and adding extra parameters. Here is what the plugin look like :

function collect(query,results) {
    if(!results.expects('TEXT'))
        return;

    var fso=new ActiveXObject("Scripting.FileSystemObject");
    var f=fso.OpenTextFile("plugins\\snippets\\text.txt");

    var objects=[];
    while(!f.AtEndOfStream) {
        var l=f.ReadLine()
        if(qatapult.match(l,query)) {
            results.addObject('TEXT',l, {'key':l, 'text':l, 'icon':'plugins\\snippets\\text.png'}); // TEXT is the type here, you can use CONTACT or FILE or your own type
        }
    }
    f.Close();
}

Because this kind of plugin has to be fast, I think that there will be separate extension mecanism for indexing slower things than would run periodically and save the results inside the sqlite db.
Title: Re: Qatapult
Post by: pigeonlips on March 01, 2012, 05:46 PM
downloaded and installed. I have no idea how to invoke it.  do we call this from a plugin.xml?

I'm not realy a dev so a little out my depth.
Title: Re: Qatapult
Post by: ewemoa on March 01, 2012, 06:30 PM
New extension mechanism looks interesting!

Downloaded and installed latest Qatapult.zip and placed uncompressed content of snippets.zip in plugins folder -- as hinted at by the posted .js:

Code: Javascript [Select]
  1. var f=fso.OpenTextFile("plugins\\snippets\\text.txt");

Qatapult crashes on start up though -- this was with XP Pro SP3.
Title: Re: Qatapult
Post by: pigeonlips on March 01, 2012, 06:41 PM
humm - i must be doing something wrong. Snippets extracted to plugins, qatapult loads a-ok but i have no idea how to make it work from here on out
Title: Re: Qatapult
Post by: pigeonlips on March 01, 2012, 06:51 PM
do you have to run the .js first or is having it in the plugins folder enough?
Title: Re: Qatapult
Post by: ewemoa on March 01, 2012, 10:02 PM
Tested with Windows 7 Pro 64-bit and also experienced crash on start up.
Title: Re: Qatapult
Post by: ecaradec on March 02, 2012, 01:21 AM
 :tellme: yes normally you just unzip the plugin inside the plugin folder. Be careful there is a folder inside it, there should be only the folder plugins/snippets/(plugin content ).

May be some file or somthing like that is missing that is causing a crash. I'll fix that asap.
Title: Re: Qatapult
Post by: ecaradec on March 02, 2012, 01:26 AM
To test it : type any string from the text file 'bonjour', 'dinausaure',... Or add your own words, however this is a very useless plugin.
Title: Re: Qatapult
Post by: ewemoa on March 02, 2012, 03:22 AM
FWIW, the following is the set up I have currently:

[ You are not allowed to view attachments ]

I've tried downloading both Qatapult.zip and snippets.zip with a different browser, but the results have been the same -- crash at start up.
Title: Re: Qatapult
Post by: ecaradec on March 02, 2012, 04:08 AM
It might be related to not having a script debugger installed. You might try to install http://www.microsoft.com/download/en/details.aspx?id=22185 to check if that fix the crash. I remember that my code from fscript could have this issue, may be it wasn't fixed in the version I reused. Does it only happens when the 'snippets' plugin is installed ?
Title: Re: Qatapult
Post by: ewemoa on March 02, 2012, 04:21 AM
I installed script debugger as you suggested and there is no crash now -- at least on Windows 7 Pro 64-bit.

I tried uninstalling script debugger and starting Qatapult -- it crashed again on start up.
Title: Re: Qatapult
Post by: ecaradec on March 02, 2012, 04:30 AM
Great, I know what's the issue now ;)
Title: Re: Qatapult
Post by: ewemoa on March 02, 2012, 04:47 AM
I hope that means you have an idea of how to fix it :)

An additional data point -- similar situation with Windows XP Pro SP3: crash without Script Debugger installed, and no crash with Script Debugger installed.
Title: Re: Qatapult
Post by: ecaradec on March 02, 2012, 05:03 AM
Yes, JScript debugger needs that you create interfaces for them to connect but they are only available if a debugger is available (nothing says that, that's just observations I learned latter from building fscript )
Title: Re: Qatapult
Post by: ewemoa on March 02, 2012, 05:24 AM
What does the query parameter to the collect function represent?  Does it correspond to what a user has typed for the currently focused pane?

When I used the typeof operator, I got back that query is a string, but when I try to see what the value is by writing it to a file, I think I'm seeing a blank value.  Code modified so that file is appended to -- and consequently non-empty query values also show up.

Below is some code trying to make its way toward becoming a plugin :)

Code: Javascript [Select]
  1. function collect(query, results) {
  2.   var fso, f, of, ForReading = 1, ForWriting = 2, ForAppending = 8;
  3.   //
  4.   if (!results.expects('TEXT')) {
  5.     return;
  6.   }
  7.   fso = new ActiveXObject("Scripting.FileSystemObject");
  8.   //
  9.   of = fso.OpenTextFile("plugins\\OpenWith\\log.txt", ForAppending, true);
  10.   of.WriteLine("query: " + query);
  11.   //
  12.   ext = pathToExtension(query);
  13.   if (ext === null) {
  14.     ext = "NONE";
  15.   }
  16.   //
  17.   of.WriteLine("ext: " + ext);
  18.   of.close();
  19.   //
  20.   f = fso.OpenTextFile("plugins\\OpenWith\\" + ext + ".txt");
  21.   //
  22.   while (!f.AtEndOfStream) {
  23.     l = f.ReadLine();
  24.     if (qatapult.match(l, query)) {
  25.       results.addObject('TEXT', l, {'key': l, 'text': l});
  26.     }
  27.   }
  28.   f.Close();
  29. }
  30.  
  31. function pathToExtension(path) {
  32.   var ma;
  33.   ma = /\.([^\\.]*)$/.exec(path);
  34.   if (ma === null) {
  35.     return null;
  36.   }
  37.   return ma[1];
  38. }
Title: Re: Qatapult
Post by: ecaradec on March 02, 2012, 06:32 AM
That's strange, it works perfectly here. Try adding something like that at the top and check if that result is visible. You might also ask for the 'openwith (catalog )' to see all the results available at this point (expects return true in all cases when you enter the catalog ).

results.addObject('TEXT', 'XXX', {'key': 'XXX', 'text': query});

I think that you'll need to define an OPENWITH type so that you can write rules. I don't know if that was clear from my explanation. That way you'll be able to create rules like FILE,'open with',OPENWITH with a correct filtering.
Title: Re: Qatapult
Post by: ecaradec on March 02, 2012, 06:36 AM
Considering what you're trying to do I think you'll need an access to the current args available in the rule to display the appropriates verbs. I don't think it is doable with what's is available for plugins at this moment... unless you've found a trick ?
Title: Re: Qatapult
Post by: ewemoa on March 02, 2012, 05:30 PM
Thanks for taking a look.

Changing ForWriting to ForAppending made it so that I can now see non-blank queries.  Perhaps with ForWriting, the file was getting overwritten coincidentally always when the query was an empty string...

I've update the code posted before.
Title: Re: Qatapult
Post by: ewemoa on March 02, 2012, 05:34 PM
Considering what you're trying to do I think you'll need an access to the current args available in the rule to display the appropriates verbs. I don't think it is doable with what's is available for plugins at this moment... unless you've found a trick ?

I haven't found a trick -- just trying to become familiar with what's currently possible :)
Title: Re: Qatapult
Post by: ecaradec on March 02, 2012, 06:56 PM
No worry I'll add a getargvalue so that you get access to the other args. Of course this will make the source dependant of the rules.
Title: Re: Qatapult
Post by: ecaradec on March 04, 2012, 04:26 PM
I've uploaded a new version. That make me think that it would be really useful that I make something to notify of changes...

- You can now script your skins. Having played with it, I think it feels really flexible and powerful. It should be pretty simple to do an Alfred like skin, or do a white background for text editing. You can control the position of each texts and add custom text for individual types, etc... I've reworked the two demonstrations skin so that you can see how to port your skin. If you had made skin you'll need to port those to the new system, there is not too many skins yet and I'll can provide help as needed. The code is a bit long (for a skin ) but I've added variable for the size of the different elements to help you to get started. Have a look at painter.js in the skin folder.

- I've also added a bunch of method on the qatapult object so those become availables for the collecter plugins as well. Ewemoa you should be able to code your openwith plugin... I think you'll found all the features you need. I'll write an api reference but for the moment most methods are demonstrated in the painter.js and they are pretty straigthforward.

- The presence of a debugger should not be required anymore now either. I wasn't able to really test it as I have too many debuggers installed, it would be a chore to get rid of every one of them. It would be nice if you could report me if it's ok.
Title: Re: Qatapult
Post by: ewemoa on March 04, 2012, 06:46 PM
Thanks for the new version :)



Just a quick note regarding:

- The presence of a debugger should not be required anymore now either. I wasn't able to really test it as I have too many debuggers installed, it would be a chore to get rid of every one of them. It would be nice if you could report me if it's ok.

When I tried with what I think is the latest -- the Qatapult.exe with MD5 d2442ae8ea4a5a8d433a131083e36682 (Qatapult.zip MD5 8cd63377c7e6bda0c9cf017e191cbeb1) -- I still get a crash on start up using Windows XP Pro SP3.
Title: Re: Qatapult
Post by: ewemoa on March 04, 2012, 08:04 PM
- I've also added a bunch of method on the qatapult object so those become availables for the collecter plugins as well.

Thanks!

Here's what I picked out of painter.js:

qatapult.getFocus()
qatapult.textmode
qatapult.getArgValue(i, "type") // i - pane number: 0, 1, 2; str - "type", "email", "text", "status"
qatapult.getQuery(i) // i - pane number
qatapult.argscount
qatapult.resultsvisible
qatapult.resultscount
qatapult.crawlprogress
qatapult.showmenu(x, y) // x, y - coordinates

and from snippets.collector.js:

qatapult.match(text, query)
results.expects('TEXT')
results.addObject('TEXT', text, {'key':l, 'text':l, 'icon':'plugins\\somewhere\\image.png'})
Title: Re: Qatapult
Post by: ewemoa on March 05, 2012, 02:04 AM
Attached, please find a first attempt at an OpenWith plugin.

Usage

  pane 0: some file name
  pane 1: Open With...
  pane 2: application name <-- see below for some notes on this

Some points:


example association.js (what's included)
Code: Javascript [Select]
  1. table =
  2.   (function () {
  3.     var table,
  4.         ahk_l, emacs, gimp, hashmyfiles, nppp, pdfx, sevenzip, sumatra,
  5.         uniextract, xnview,
  6.         imageviewers;
  7.     //
  8.     ahk_l = "..\\AutoHotkey_L\\AutoHotkey.exe";
  9.     emacs = "..\\emacs\\bin\\runemacs.exe";
  10.     gimp = "..\\GIMPPortable\\GIMPPortable.exe";
  11.     hashmyfiles = "..\\NirLaunchers\\NirSoft\\hashmyfiles.exe";
  12.     nppp = "..\\Notepad++Portable\\Notepad++Portable.exe";
  13.     pdfx = "..\\PDFX_Vwr\\PDFXCview.exe";
  14.     sevenzip = "..\\7-ZipPortable\\7-ZipPortable.exe";
  15.     sumatra = "..\\SumatraPDFPortable\\SumatraPDFPortable.exe";
  16.     uniextract = "..\\uniextract\\UniExtract.exe";
  17.     xnview = "..\\XnViewPortable\\XnViewPortable.exe";
  18.     //
  19.     imageviewers = [gimp, xnview];
  20.     //
  21.     table =
  22.       {
  23.        "exe": uniextract,
  24.        //
  25.        "pdf": [sumatra, pdfx],
  26.        "txt": [nppp, emacs],  
  27.        //
  28.        "png": imageviewers,
  29.        "jpg": imageviewers,
  30.        "gif": imageviewers,
  31.        //
  32.        "7z": sevenzip,
  33.        "iso": [sevenzip],
  34.        "rar": sevenzip,
  35.        "tgz": sevenzip,
  36.        "zip": [sevenzip, uniextract]
  37.       };
  38.     return table;
  39.    })();

MD5: 17eef4789a9a064d15a7c4006d07776c
Title: Re: Qatapult
Post by: ecaradec on March 05, 2012, 02:07 AM
I've found a mistake that is probably causing the crash. Could you try it again ewemoa ?

Scores configuration is not available yet, you're correct.
Title: Re: Qatapult
Post by: ewemoa on March 05, 2012, 02:19 AM
Hurray!  No crashes when starting up for both Windows XP Pro SP3 and Windows 7 Pro 64-bit :)

Title: Re: Qatapult
Post by: ecaradec on March 05, 2012, 02:56 AM
Wuhuu !
Title: Re: Qatapult
Post by: ecaradec on March 05, 2012, 03:05 AM
Hum, judging from the colors of icons it seems that I forgot an alpha premultiplication. If you have weird colors, this is it : I'll fix that this evening.
Title: Re: Qatapult
Post by: ewemoa on March 05, 2012, 03:34 AM
Thanks for the pointer -- I'm not noticing anything with the colors under Windows XP Pro SP3.



Below is a bit fancier associations.js.  It provides an array addtoall which can be used to add applications to all configured extensions -- for example, it might be convenient for all extensions to be associated with applications such as hex editors, checksum calculators, etc.

Code: Javascript [Select]
  1. table =
  2.   (function () {
  3.     var table, ext, rule, theType,
  4.         //
  5.         ahk_h, ahk_l, emacs, frhed, gimp, hashmyfiles, hfs, nppp, pdfx,
  6.         sevenzip, smplayer, ssc, sumatra, uniextract, vlc, xnview,
  7.         //
  8.         imageviewers, videoplayers,
  9.         //
  10.         addtoall;
  11.     //
  12.     ahk_h = "..\\AutoHotkey_H\\Win32w\\AutoHotkey.exe";
  13.     ahk_l = "..\\AutoHotkey_L\\AutoHotkey.exe";
  14.     emacs = "..\\emacs\\bin\\runemacs.exe";
  15.     frhed = "..\\FrhedPortable\\FrhedPortable.exe";
  16.     gimp = "..\\GIMPPortable\\GIMPPortable.exe";
  17.     hashmyfiles = "..\\NirLauncher\\NirSoft\\hashmyfiles.exe";
  18.     hfs = "..\\hfs\\hfs.exe";
  19.     nppp = "..\\Notepad++Portable\\Notepad++Portable.exe";
  20.     pdfx = "..\\PDFX_Vwr\\PDFXCview.exe";
  21.     sevenzip = "..\\7-ZipPortable\\7-ZipPortable.exe";
  22.     ssc = "..\\ScreenshotCaptor\\ScreenshotCaptor.exe";
  23.     smplayer = "..\\SMPlayer\\smplayer.exe";
  24.     sumatra = "..\\SumatraPDFPortable\\SumatraPDFPortable.exe";
  25.     uniextract = "..\\uniextract\\UniExtract.exe";
  26.     vlc = "..\\VLCPortable\\VLCPortable.exe";
  27.     xnview = "..\\XnViewPortable\\XnViewPortable.exe";
  28.     //
  29.     imageviewers = [gimp, xnview];
  30.     videoplayers = [smplayer, vlc];
  31.     //
  32.     addtoall = [frhed, hashmyfiles, hfs];
  33.     //
  34.     table =
  35.       {
  36.        "ahk": [ahk_h, ahk_l],
  37.        //
  38.        "exe": uniextract,
  39.        //
  40.        "pdf": [sumatra, pdfx],
  41.        "txt": [nppp, emacs],  
  42.        //
  43.        "gif": imageviewers,
  44.        "jpg": imageviewers,
  45.        "png": imageviewers,
  46.        "ssc": imageviewers,
  47.        //
  48.        "avi": videoplayers,
  49.        "flv": videoplayers,
  50.        "mpg": videoplayers,
  51.        "mpeg": videoplayers,
  52.        "mp4": videoplayers,
  53.        "mov": videoplayers,
  54.        //
  55.        "7z": sevenzip,
  56.        "iso": [sevenzip],
  57.        "rar": sevenzip,
  58.        "tgz": sevenzip,
  59.        "zip": [sevenzip, uniextract]
  60.       };
  61.     // adding to all
  62.     // XXX: not worrying about duplicates atm
  63.     for (ext in table) {
  64.       rule = table[ext];
  65.       theType = typeof rule;
  66.       if (theType === "string") {
  67.         table[ext] = [rule].concat(addtoall);
  68.       } else if (theType === "object") {
  69.         table[ext] = table[ext].concat(addtoall);
  70.       } else {
  71.         // XXX: not expected...
  72.       }
  73.     }
  74.     //
  75.     return table;
  76.    })();
Title: Re: Qatapult
Post by: ecaradec on March 05, 2012, 07:16 AM
It seems that the colors are actually corrects. The new ugly "internet explorer" icon induced me in error. What's the hell were they thinking ? The colors are so awful that I supposed that I had broken something !!!
Title: Re: Qatapult
Post by: ewemoa on March 05, 2012, 07:21 AM
Perhaps one of the purposes was to attract attention...it seems there was some success in that...
Title: Re: Qatapult
Post by: ecaradec on March 05, 2012, 08:42 AM
Looking back again, still there is an issue : the run command looks really bad, so does others.
Title: Re: Qatapult
Post by: ecaradec on March 05, 2012, 05:42 PM
After another check, I think this is ok :P . Pray that I don't change my mind in a few minutes.
Title: Re: Qatapult
Post by: pigeonlips on March 06, 2012, 02:27 PM
Hi All,

heres an attempt at an Alfred like skin (note i have never used it so its based on the screen shots I've seen)

I wouldn't recommend using it as its far from finished, but i was hoping for a little help (or to find out whats possible)

Any hints on the following:

(http://i40.tinypic.com/jaupsm.jpg)

1 - any way of making the text in the input box a different size and color?

2 -

A) the results box background is white and i don't know how (or if) you can set a background. If i could then the skin could be something more classy than white. The ideal would be if i could make the background color transparent as that way there's less images to load for the skin.

B) is there any way of controlling the size of the results? This way i could fit more into results without the skin being very large.

3 - the text of the type TEXT always appears white at the bottom. I have no idea how to set this.

4 - you'll have to try the skin for this one but it would be nice to set some more properties depending on the type. Any way of finding out whats available by type in qatapult.getArgValue(0, "XXXX")
also Is it a bad idea to use code in the script to get other properties. I was thinking somthing like

if (last bit of filename = "mp3")
 show filename.album
 show filename.artist
 show filename.track

I'm not sure if this is ill advised as performance hit to qatapult is not what i want. I guess i might just have to try that one out.

Spoiler
Code: Javascript [Select]
  1. var skin="skins\\alfred-like\\";
  2. var SkinWidth=500;
  3. var SkinHeight=300;
  4. var SkinBorder=10;
  5.  
  6. function draw(ui)
  7. {
  8.         // set the text color
  9.         ui.textcolor=0x88000000;
  10.         ui.fontsize=12;
  11.         // draw the canvas
  12.         ui.drawBitmap(skin+"background.png", 0, 0, SkinWidth, SkinHeight);
  13.        
  14.         // draw the input box
  15.         // HELP >  ----------------------------------------------------------
  16.         // HELP >
  17.         // HELP > ui.fontsize=16; /* doesnt affect the size of the input box below */
  18.         // HELP >  ----------------------------------------------------------
  19.         ui.drawInput(30,42,SkinWidth-((SkinBorder+10)*2),15);
  20.        
  21.         // now draw the items - pane one
  22.         if(qatapult.argscount==1)
  23.         {
  24.                 drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36);
  25.                 //ui.drawBitmap(skin+"next.png",190,SkinHeight - 37, 15, 15);
  26.         }
  27.         // now draw the items - pane two
  28.         if (qatapult.argscount==2)
  29.         {
  30.                 drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36);
  31.                 drawItem(ui,1, SkinBorder + 200, SkinHeight - 47, 150, 36);
  32.                 ui.drawBitmap(skin+"next.png",190,SkinHeight - 37, 15, 15);    
  33.         }
  34.         // now draw the items - pane three
  35.         if (qatapult.argscount==3)
  36.         {
  37.                 drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36);
  38.                 drawItem(ui,1, SkinBorder + 200, SkinHeight - 47, 150, 36);
  39.                 drawItem(ui,2, SkinBorder + 350, SkinHeight - 47, 150, 36);
  40.                 ui.drawBitmap(skin+"next.png",340,SkinHeight - 37, 15, 15);
  41.         }
  42.        
  43.         // draw results box
  44.         if(/*qatapult.resultsvisible && */qatapult.resultscount!=0)
  45.         {
  46.                 var resultscount=Math.min(5,qatapult.resultscount);
  47.                 // HELP >  ----------------------------------------------------------
  48.                 // HELP >  can we change the background or color of the results box?
  49.                 // HELP >  I have am using a white skin so that it matchs the background of the results
  50.                 // HELP >  ----------------------------------------------------------
  51.                
  52.                 // HELP >  ----------------------------------------------------------
  53.                 // HELP >  can the size of the items be set. If it where smaller i could fit in more results
  54.                 // HELP >  ----------------------------------------------------------
  55.                
  56.                 ui.drawResults(SkinBorder,65,(SkinWidth/2) - SkinBorder,SkinHeight -(100+SkinBorder));
  57.         }      
  58.        
  59.         if(qatapult.argscount>1)
  60.         {
  61.                 // whats the type?
  62.                 type = qatapult.getArgValue(0, "type")
  63.        
  64.                 if (type == "TEXT")
  65.                 {
  66.                         // set text size and color
  67.                         ui.fontsize=8;
  68.                         ui.textcolor=0x88000000;
  69.                        
  70.                         // draw the frame - this can be used for images or something.
  71.                         ui.drawBitmap(skin+"frame.png",320 ,65, 107, 91);
  72.                        
  73.                         // display some info in text
  74.                         status = qatapult.getArgValue(0, "status")
  75.                         email = qatapult.getArgValue(0, "email")
  76.                         text = qatapult.getArgValue(0, "text")
  77.                         ui.drawText("type : "+type, SkinWidth/2 + SkinBorder,160,200,15); // seams static in the wrong position ?
  78.                         ui.drawText("status : "+status, SkinWidth/2 + SkinBorder,180,200,15); // seams centered?
  79.                         ui.drawText("email : "+email, SkinWidth/2 + SkinBorder,200,200,15); // seams static in the wrong position ?
  80.                         ui.drawText("text : "+text, SkinWidth/2 + SkinBorder,220,200,15); // seams centered?
  81.                         ui.fontsize=12;
  82.                        
  83.                         // the first result at the bottom in free text is white. ? Add it here instead.
  84.                         ui.drawText(status, SkinBorder + 20,SkinHeight - 47, 150, 36);
  85.                 }
  86.                 if (type == "FILE")
  87.                 {
  88.                         // set text size and color
  89.                         ui.fontsize=14;
  90.                         ui.textcolor=0x88000000;
  91.                        
  92.                         // draw the Icon
  93.                         drawItem(ui,0,320 ,65, 107, 91);
  94.                        
  95.                         // display some info in text
  96.                         filedir = qatapult.getArgValue(0, "rdirectory")
  97.                         filename = qatapult.getArgValue(0, "rfilename")
  98.  
  99.                         ui.drawText(filename, SkinWidth/2 + SkinBorder,160,200,25);
  100.                        
  101.                         ui.fontsize=8;
  102.                         ui.drawText("directory : ", SkinWidth/2 + SkinBorder,190,200,15);
  103.                         ui.drawText(filedir, SkinWidth/2 + SkinBorder,205,200,30);
  104.                         ui.fontsize=12;
  105.                        
  106.                 }
  107.                 if (type == "WINDOW")
  108.                 {
  109.                         // set text size and color
  110.                         ui.fontsize=8;
  111.                         ui.textcolor=0x88000000;
  112.                        
  113.                         // draw the frame - this can be used for images or something.
  114.                         ui.drawBitmap(skin+"frame.png",320 ,65, 107, 91);
  115.                        
  116.                         // display some info in text
  117.                         winTitle = qatapult.getArgValue(0, "title")
  118.                         winHWD = qatapult.getArgValue(0, "hwnd")
  119.                         text = qatapult.getArgValue(0, "text")
  120.                         ui.drawText(winTitle, SkinWidth/2 + SkinBorder,160,200,15); // seams static in the wrong position ?
  121.                         ui.drawText("Windows Handle : "+winHWD, SkinWidth/2 + SkinBorder,180,200,15); // seams centered?
  122.                         ui.fontsize=12;
  123.                 }
  124.                 else
  125.  
  126.                 {
  127.                         drawItem(ui,0,320 ,65, 107, 91);
  128.                 }
  129.         }
  130.  
  131.  
  132.        
  133.         // draw the menu button
  134.         ui.drawBitmap(skin+"ui-radio-button.png", SkinWidth-40, SkinBorder, 16, 16);
  135.  
  136.     // drawn index progress
  137.     ui.fontsize=8;
  138.     ui.textcolor=0x88000000;
  139.     if(qatapult.crawlprogress!=0 && qatapult.crawlprogress!=100)
  140.         ui.drawText("Updating index : "+qatapult.crawlprogress+"%",SkinBorder,SkinBorder,SkinWidth-(SkinBorder*2),15)
  141.  
  142.                
  143.         // this drew status line - opting out of this as i dont know where to put it at the moment
  144.         /*
  145.         var focus=qatapult.getFocus();
  146.         ui.drawEmphased(qatapult.getArgValue(focus,"status"),qatapult.getQuery(focus),15,SkinHeight-20,SkinWidth-30,10);
  147.         */
  148.        
  149.        
  150.         // determine the mode - will add support for this later.
  151.         /*
  152.     if(qatapult.textmode)
  153.     {
  154.         //ui.drawBitmap(skin+"textbackground.png", 0, 0, 350, 200);
  155.         //ui.drawInput(25,25,305,138);
  156.         //height=200;
  157.     }
  158.     else
  159.     {
  160.         //ui.textcolor=0xFF000000;
  161.         // draw the background according to the number of current args
  162.         if(qatapult.argscount<3)
  163.            {
  164.             //ui.drawBitmap(skin+"background.png", 0, 0, 350, 120);
  165.             //height=120;
  166.         }
  167.            else
  168.            {
  169.             //ui.drawBitmap(skin+"background_3.png", 0, 0, 350, 170);
  170.             //height=170;
  171.         }
  172.     }
  173.     */
  174. }
  175.  
  176. function drawItem(ui,i,x,y,w,h) {
  177.    
  178.     if(qatapult.getArgValue(i,"type")=="TEXT") {
  179.                 // HELP >  ----------------------------------------------------------
  180.                 // HELP > free text always appears in white. Dont know how to set the color?
  181.                 // ui.drawItem(i,x+5,y+5,w-10,h-20);
  182.     } else {
  183.         // draw the item visual and draw it's label below
  184.         ui.drawItem(i,x+2,y+2,h-4,h-4);
  185.         var text="";
  186.         //if(qatapult.getArgValue(i,"email")!="")
  187.           //  var text=" <"+qatapult.getArgValue(i,"email")+">";
  188.         ui.drawEmphased(qatapult.getArgValue(i,"text")+text,qatapult.getQuery(i),x+h,y+10,w-2*h,30);
  189.     }
  190.    
  191. }
  192.  
  193. function onClick(x,y) {
  194.     if(x>SkinWidth-(SkinBorder*2) && x<SkinWidth-(SkinBorder*2)+16 && y>SkinBorder && y<SkinBorder+20)
  195.         qatapult.showmenu(x,y);
  196. }





Title: Re: Qatapult
Post by: ecaradec on March 06, 2012, 05:31 PM
For text color you can use textcolor on the UI object. You can also use the fontfamily property to select a different font.

The results have a white background, its actually not a very good idea, I'll give an option to change the colors. Anyways I'll probably give control on the display of the results.
Results are 40 pixels high right now, I use the size given in drawresults to know how much I can fit in.

3. Uuuh ? I'm not sure about what you mean, I'll give a look at the skin tomorrow

4. Don't worry about the performance of getstring it's in memory, you'll run out of place on the skin before it get slow

I've found a little issue with the usage bonus on results. It seems ignored on files. Beyond that, I'm splitting this info so that I get exact number of uses and last data for improving the quality and learning of qatapult

I love the start of that skin ;)
Title: Re: Qatapult
Post by: ecaradec on March 07, 2012, 06:50 AM
Sorry for the strange previous response. I typed it on my phone, so it's a bit weird.  :P. I forgot to address some of your questions :

- For the input field I probably forgot to use the specified fontsize and color. I'll fix that.
- About 4, I'll give you a way to enumerate what is available inside the objects. Until that you can watch in the database too : anything that's available as a string in the DB is available via getArgValue. There are some properties that are deduced like rpath and rdirectory but there are only a few.
Title: Re: Qatapult
Post by: ecaradec on March 07, 2012, 04:35 PM
I tried a small test adding a background to the pigeonlips skin to test the new transparent results and it looks nice so I'm sharing it for just that reason. The picture is from here http://photography.nationalgeographic.com/photography/photo-of-the-day/mediterranean-sea-swimming/ I picked it a bit randomly on the internet.
Title: Re: Qatapult
Post by: pigeonlips on March 07, 2012, 04:53 PM
For now here's a *cough* better version on the skin.

This skin is my first time ever using js so please point out anything that's wrong. Its but fugaly (code wise) but it does get closer to that "alfred app" experience.

Found out how to get the extended properties of a file.

Bashed my head against a wall trying to get data out of id3 tags, so for now album art only works if you have a cover.jpg in the folder of the mp3s listed. Lucky me i always have this. I need to include a library to get this done right but at the moment thats a little advanced for me.  Any tips around this will save me a lot off googleing

Also the extended property index of a file differ for windows OS (win Xp, 2000, vista, 7) so they need to be changed. I'll write a skin for each version, but can only test on xp.

I was using info from http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=201630 to get them.

its still very rough but my heart isn't in getting it to look slick until it can be something other than white.

You post gives me hope. It looks nice. I cannot wait to try it out - let me know when its ready and how to set the transparency. Then i'll add tons more polish and finish it off.

If you just after the js (dont think the images changed):

Spoiler
var skin         ="skins\\alfred-like\\";
var SkinWidth      =500;
var SkinHeight      =300;
var SkinBorder      =10;

function draw(ui)
{
   // set the text color
   ui.textcolor   =0x88000000;
   ui.fontsize   =12;
   
   // draw the canvas
   ui.drawBitmap(skin+"background.png", 0, 0, SkinWidth, SkinHeight);
   
   //  >  ----------------------------------------------------------
   //  > I mieght make this bigger one day
   //  >  ----------------------------------------------------------
   ui.drawInput(30,42,SkinWidth-((SkinBorder+10)*2),15);
   
   // now draw the items - pane one
   if(qatapult.argscount==1)
   {
      drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36);
      //ui.drawBitmap(skin+"next.png",190,SkinHeight - 37, 15, 15);
   }
   // now draw the items - pane two
   if (qatapult.argscount==2)
   {
      drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36);
      drawItem(ui,1, SkinBorder + 200, SkinHeight - 47, 150, 36);
      ui.drawBitmap(skin+"next.png",190,SkinHeight - 37, 15, 15);   
   }
   // now draw the items - pane three
   if (qatapult.argscount==3)
   {
      drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36);
      drawItem(ui,1, SkinBorder + 200, SkinHeight - 47, 150, 36);
      drawItem(ui,2, SkinBorder + 350, SkinHeight - 47, 150, 36);
      ui.drawBitmap(skin+"next.png",340,SkinHeight - 37, 15, 15);
   }
   
   // draw results box
   if(qatapult.resultscount!=0)
   {
      var resultscount=Math.min(5,qatapult.resultscount);
      // >  ----------------------------------------------------------
      // >  new version might allow the background or color of the results box
      // >  to change - revisit if this happens as we need to set it here
      //  >  ----------------------------------------------------------

      ui.drawResults(SkinBorder,65,(SkinWidth/2) - SkinBorder,SkinHeight -(100+SkinBorder));
      
      if (qatapult.resultscount>4)
      {
         ui.fontsize   =   8;
         ui.drawText("... arrow down for more ...", SkinBorder,SkinHeight -(57+SkinBorder),(SkinWidth/2) - SkinBorder, 15);
      }
   }   
   else
   {
      ui.drawText("start typing ..... ", SkinBorder * 2 ,190,200,50);
   }
   
   if(qatapult.argscount>1)
   {
      // whats the type?
      type = qatapult.getArgValue(0, "type");
      
      if (type == "TEXT")
      {         
         // display the image of the object
         ui.drawBitmap("icons\\edit.png",320 ,65, 107, 91);

         // set text size and color
         ui.fontsize   =   14;
         ui.textcolor   =   0x88000000;
      
         // display the heading of the object
         ui.drawText("free text", SkinWidth/2 + SkinBorder,160,200,25);
         // reset the size
         ui.fontsize   =   8;
         ui.textcolor   =0x88000000;
         
         // display the text info about the object
         ui.drawText(qatapult.getArgValue(0, "status"), SkinWidth/2 + SkinBorder,190,200,50);
         
         /*
         // the first result at the bottom in free text is white. ? Add it here instead.
         ui.drawText(status, SkinBorder + 20,SkinHeight - 47, 150, 36);
         */
      }
      if (type == "WINDOW")
      {
         // set text size and color
         ui.fontsize   =   8;
         ui.textcolor   =   0x88000000;
         
         // draw the frame - this can be used for images or something.
         ui.drawBitmap(skin+"frame.png",320 ,65, 107, 91);
         
         // display some info in text
         winTitle       = qatapult.getArgValue(0, "title");
         winHWD       = qatapult.getArgValue(0, "hwnd");
         text       = qatapult.getArgValue(0, "text");
         ui.drawText(winTitle, SkinWidth/2 + SkinBorder,160,200,15); // seams static in the wrong position ?
         ui.drawText("Windows Handle : "+winHWD, SkinWidth/2 + SkinBorder,180,200,15); // seams centered?
         ui.fontsize   =   12;
      }
      if (type == "FILE")
      {
         var heading    =    "";
         var picture    =    "";
         var item1    =    "";
         var item2    =    "";
         var item3    =    "";

         var fileext   =    "";
      
         // what is the file and where is it. We'll need this most of the time in the if statements below. Get it early then.
         filedir = qatapult.getArgValue(0, "directory")
         filename = qatapult.getArgValue(0, "filename")
         
         // Time to work out the extention. WIth this we can target the best properties of an object to display
         fileext = filename.substring(filename.length,filename.length-4);
         // lower case the extension then it doesnt matter is its .xxx or .XXX or .XxX - we still know it
         fileext = fileext.toLowerCase()

         if ((fileext == ".png")||(fileext == ".jpg")||(fileext == ".bmp"))
         {
            heading    =    "Image";
            picture    =    filedir+"\\"+filename;
            
            // draw the picture border
            //ui.drawBitmap(skin+"frame.png",316 ,61, 116, 100);

            item1    =    "";
            item2    =    "";
            item3    =    "";
         }
         else if (fileext == ".mp3")
         {
            heading    = "Audio";
            // cheap but luckly me i keep cover.jpg in my music folders. - would be nice to rip the thumb from the id3 tag.
            // ui.drawBitmap(skin+"frame.png",316 ,61, 116, 100);
            picture    =    filedir+"\\cover.jpg";
            
            // now lets get the extended properties of the file.
            // these vaules are diffrent for XP win 7 and vista. Need to make seprate skins for this.
            // http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=201630            
            var ARTIST_NAME    =    16; // Win7 use 216
            var ALBUM_TITLE    =    17; // Win7 use 14
            var YEAR          =    18; // Win7 use 15

            // need the filename to be an object!
            var oShell        =    new ActiveXObject("Shell.Application");
            var oFolder       =    oShell.Namespace(filedir);
            var oFile         =    oFolder.ParseName(filename);
                        
            item1   =   "Artist : "    + oFolder.GetDetailsOf(oFile, ARTIST_NAME);
            item2   =   "Album: "      + oFolder.GetDetailsOf(oFile, ALBUM_TITLE);
            item3   =   "Year: "      + oFolder.GetDetailsOf(oFile, YEAR);
   
         }
         else if (fileext == ".lnk")
         {
            heading    =    "Shortcut";         
            item1   =   qatapult.getArgValue(0, "rfilename");
            item2   =   qatapult.getArgValue(0, "rdirectory");            
         }
         else if (fileext == ".exe")
         {   
            heading = filename;
            // now lets get the extended properties of the file.
            // these vaules are diffrent for XP win 7 and vista. Need to make seprate skins for this.
            // http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=201630            
            var COMPANY_NAME    =    35;
            var FILE_VERSION    =    37; // Win7 use 156
            var PROGRAM_DESC    =    30;

            // need the filename to be an object!
            var oShell     =   new ActiveXObject("Shell.Application");
            var oFolder    =    oShell.Namespace(filedir);
            var oFile      =    oFolder.ParseName(filename);
            
            item1   =   "Company Name : "       + oFolder.GetDetailsOf(oFile, COMPANY_NAME);
            item2   =   "File Version : "      + oFolder.GetDetailsOf(oFile, FILE_VERSION);
            item3   =   "Description : "      + oFolder.GetDetailsOf(oFile, PROGRAM_DESC);
         }
         else
         {
            // now lets get the extended properties of the file.
            // these vaules are diffrent for XP win 7 and vista. Need to make seprate skins for this.
            // http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=201630            
            var FILE_TYPE       =    2;
            var DATE_CREATED    =    4; // Win7 use 156
            var FILE_SIZE          =    1;
            var ATTRIBUTES    =    6;

            // need the filename to be an object!
            var oShell     =    new ActiveXObject("Shell.Application");
            var oFolder    =    oShell.Namespace(filedir);
            var oFile      =    oFolder.ParseName(filename);
            
            heading       =    oFolder.GetDetailsOf(oFile, FILE_TYPE);      
            item1      =   "Created : "       + oFolder.GetDetailsOf(oFile, DATE_CREATED);
            item2      =   "Size : "         + oFolder.GetDetailsOf(oFile, FILE_SIZE);
            item3      =   "Attributes : "      + oFolder.GetDetailsOf(oFile, ATTRIBUTES);
         }

         // Draw the properties of the object for type FILE depending on whats been set above
         
         // display the image of the object
         if (picture !="")
         {
            ui.drawBitmap(picture,320 ,65, 107, 91);
         }
         else
         {
            drawItem(ui,0,320 ,65, 107, 91);
         }
         
         // set text size and color for header
         ui.fontsize   =   14;
         ui.textcolor   =   0x88000000;
      
         // display the heading of the object
         ui.drawText(heading, SkinWidth/2 + SkinBorder,160,200,25);
         
         // reset the size for the rest
         ui.fontsize   =   8;
         ui.textcolor   =   0x88000000;
         
         // display the text info about the object
         ui.drawText(item1, SkinWidth/2 + SkinBorder,190,200,15);
         ui.drawText(item2, SkinWidth/2 + SkinBorder,210,200,15);
         ui.drawText(item3, SkinWidth/2 + SkinBorder,230,200,15);
      }
      else
      {
         drawItem(ui,0,320 ,65, 107, 91);
      }
}

   // draw the menu button
   ui.drawBitmap(skin+"ui-radio-button.png", SkinWidth-33, SkinBorder+2, 16, 16);

    // drawn index progress
    ui.fontsize   =   8;
    ui.textcolor   =   0x88000000;
    if(qatapult.crawlprogress!=0 && qatapult.crawlprogress!=100)
        ui.drawText("Updating index : "+qatapult.crawlprogress+"%",SkinBorder,SkinBorder,SkinWidth-(SkinBorder*2),15)

      
   // this drew status line - opting out of this as i dont know where to put it at the moment
   /*
   var focus=qatapult.getFocus();
   ui.drawEmphased(qatapult.getArgValue(focus,"status"),qatapult.getQuery(focus),15,SkinHeight-20,SkinWidth-30,10);
   */
   
   
   // determine the mode - will add support for this later.
   /*
    if(qatapult.textmode)
    {
        //ui.drawBitmap(skin+"textbackground.png", 0, 0, 350, 200);
        //ui.drawInput(25,25,305,138);
        //height=200;
    }
    else
    {
        //ui.textcolor=0xFF000000;
        // draw the background according to the number of current args
        if(qatapult.argscount<3)
      {
            //ui.drawBitmap(skin+"background.png", 0, 0, 350, 120);
            //height=120;
        }
      else
      {
            //ui.drawBitmap(skin+"background_3.png", 0, 0, 350, 170);
            //height=170;
        }
    }
    */
}

function drawItem(ui,i,x,y,w,h)
{    
    if(qatapult.getArgValue(i,"type")=="TEXT")
    {
      // HELP >  ----------------------------------------------------------
      // HELP > free text always appears in white. Dont know how to set the color?
      // ui.drawItem(i,x+5,y+5,w-10,h-20);
    }
    else
    {
        // draw the item visual and draw it's label below
        ui.drawItem(i,x+2,y+2,h-4,h-4);
        var text   =   "";
        //if(qatapult.getArgValue(i,"email")!="")
          //  var text=" <"+qatapult.getArgValue(i,"email")+">";
        ui.drawEmphased(qatapult.getArgValue(i,"text")+text,qatapult.getQuery(i),x+h,y+10,w-2*h,30);
    }
}

//   ui.drawBitmap(skin+"ui-radio-button.png", SkinWidth-33, SkinBorder+2, 16, 16);
function onClick(x,y)
{
    if(x > SkinWidth-33 && x < SkinWidth-17 && y > SkinBorder + 2 && y < SkinBorder + 18)
        qatapult.showmenu(x,y);
}

Title: Re: Qatapult
Post by: ecaradec on March 07, 2012, 05:06 PM
That's a very impressive work for a newcomer to javascript.

I've also added a few things to allow path trimming (... inside the middle of the path instead of the end ) and a textrendering hint that allow you to use full antialias or grid fit that looks darker on screens.
Title: Re: Qatapult
Post by: pigeonlips on March 07, 2012, 05:14 PM
For text color you can use textcolor on the UI object. You can also use the fontfamily property to select a different font.

thanks i'll give this a try.

3. Uuuh ? I'm not sure about what you mean, I'll give a look at the skin tomorrow
Again i didnt explain this well. I didnt understand what was happening at first, but I think its on the matching of the status. In stead of colors i'll explain via text case. for example i type:

> appcatn

and in the bottom left by the 3 in the piture i get :

> APPliCATioN

only the Upper case text (its not really upper case - just making it that way to help explain) shows in an off white which is nearly invisible - its this text i would like to control the color off. The lower case text displays in the normal color i set so that bits fine. The only real problem is if its free text (using ' for example) then it all appears in uppercase. I understand it better now after more playing around so in a nutshell

- it would be nice to set the color of the matching text from the inputbox

4. Don't worry about the performance of getstring it's in memory, you'll run out of place on the skin before it get slow

Again i didnt explain this too well ether. I was worryed about preformance of the skin/qatapult if i coded to get properties of the object from other sources. ID3 tag of the file, EXIF info for images etc. I guess i just wanted a little hand holding, but the only way to find out is to give it a try.

I have and the new skin looks up extended properties of a FILE type. ID3 tags and EXIF are a little out of my reach for now.

I love the start of that skin

thanks :) - its still very early - It needs lots more polish. Little things like the alignment of contorls, text sizes etc. i'll make it nicer soon. Work in progress.
Title: Re: Qatapult
Post by: pigeonlips on March 07, 2012, 05:20 PM
That's a very impressive work for a newcomer to javascript. - I've also added a few things to allow path trimming

lol - while writing and testing , writing and testing you wouldn't believe the pain i was causing qatapult and the crazy erratic behavior i got  :) - thanks for the kind comment, but i'm still worried its buggy.

also dont add to much - the learning curve is hard! LOL - just kidding.
Title: Re: Qatapult
Post by: ewemoa on March 07, 2012, 07:56 PM
This skin is my first time ever using js so please point out anything that's wrong.

You may find strong opinions about JavaScript :)

As I understand it, JavaScript didn't get much time for design and polish before it got shipped and this shows.  There are many oddities / warts in the language and sadly often trying to do things in a way that seems to make sense can backfire -- particularly if one has expectations about the language coming from a C / C++ (or similar) background.

If you intend to continue with the language, I highly recommend checking out some of Douglas Crockford's material early on, perhaps starting with:

  Crockford on JavaScript (http://yuiblog.com/crockford/)

Even if one doesn't agree with some or much of what he says, I've found his material well worth the time.

He suggests an approach to the language based on being quite selective in what to use in the language and staying away from certain bits (e.g. he suggests not using == or != and instead using === and !==).  I have found this helps tremendously for JavaScript (and even AHK) but it isn't necessarily the easiest thing to figure out or get used to.

To help in this process, there is a tool Crockford developed and maintains called jslint (and now at least one fork called jshint).  I used jslint while doing JavaScript (via FScript) plugin development for FARR and found it to be really helpful.  Haven't set it up for Qatapult yet, but based on working with the OpenWith plugin, getting the feeling it may be a good idea.



After writing the above, I remembered that there is now this thing called CoffeeScript.  It compiles to JavaScript and although it has its problems, seems a far nicer language to be writing in.  It's pretty easy to get it set up once one has Node.js installed.  May be I'll see how practical it would be to use for Qatapult-related things.

Any interest?
Title: Re: Qatapult
Post by: ewemoa on March 07, 2012, 08:55 PM
BTW, any chance of being able to use PgUp and PgDn for results navigation?
Title: Re: Qatapult
Post by: ewemoa on March 07, 2012, 09:03 PM
Just a quick note to mention that slightly modifying the output of coffee (a CoffeeScript compiler), seems to produce a Qatapult-usable result.

The following CoffeeScript content for snippets.collecter.js:

Code: Text [Select]
  1. collect = (query, results) ->
  2.   if results.expects('TEXT')
  3.     fso = new ActiveXObject("Scripting.FileSystemObject")
  4.     f = fso.OpenTextFile("plugins\\snippets\\text.txt")
  5.     while not f.AtEndOfStream
  6.       l = f.ReadLine()
  7.       if qatapult.match(l, query)
  8.         obj =
  9.           key: l
  10.           text: l
  11.           icon: "plugins\\snippets\\text.jpg"
  12.         results.addObject('TEXT', l, obj)

turns into:

Code: Javascript [Select]
  1. (function() {
  2.   var collect;
  3.  
  4.   collect = function(query, results) {
  5.     var f, fso, l, obj, _results;
  6.     if (results.expects('TEXT')) {
  7.       fso = new ActiveXObject("Scripting.FileSystemObject");
  8.       f = fso.OpenTextFile("plugins\\snippets\\text.txt");
  9.       _results = [];
  10.       while (!f.AtEndOfStream) {
  11.         l = f.ReadLine();
  12.         if (qatapult.match(l, query)) {
  13.           obj = {
  14.             key: l,
  15.             text: l,
  16.             icon: "plugins\\snippets\\text.jpg"
  17.           };
  18.           _results.push(results.addObject('TEXT', l, obj));
  19.         } else {
  20.           _results.push(void 0);
  21.         }
  22.       }
  23.       return _results;
  24.     }
  25.   };
  26.  
  27. }).call(this);

I think removing the first and last lines may make the result usable by Qatapult.
Title: Re: Qatapult
Post by: ewemoa on March 08, 2012, 02:36 AM
I tried a rough rewrite (non-idiomatic CoffeeScript) of OpenWith.collecter.js.  Removing the debugging related stuff, it looks like:

Code: Text [Select]
  1. collect = (query, results) ->
  2.   # for OpenTextFile
  3.   ForReading = 1
  4.   ForWriting = 2
  5.   ForAppending = 8
  6.   # http://coffeescriptcookbook.com/chapters/classes_and_objects/type-function
  7.   type = (obj) ->
  8.     if obj == undefined or obj == null
  9.       return String obj
  10.     classToType = new Object
  11.     for name in "Boolean Number String Function Array Date RegExp".split(" ")
  12.       classToType["[object " + name + "]"] = name.toLowerCase()
  13.     myClass = Object.prototype.toString.call obj
  14.     if myClass of classToType
  15.       return classToType[myClass]
  16.     return "object"
  17.   # file extension from file path
  18.   pathToExtension = (filePath) ->
  19.     extRE = /\.([^\\.]*)$/
  20.     ma = extRE.exec(filePath)
  21.     if not ma
  22.       return null
  23.     ma[1]
  24.   #
  25.   if not results.expects('FILE')
  26.     return
  27.   #
  28.   pane = qatapult.getFocus()
  29.   if pane != 2
  30.     return
  31.   #
  32.   fso = new ActiveXObject("Scripting.FileSystemObject")
  33.   #
  34.   p0 = qatapult.getArgValue(0, "path")
  35.   ext = pathToExtension(p0)
  36.   if not ext
  37.     ext = 'NONE'
  38.   #
  39.   table = {}
  40.   try
  41.     rf = fso.OpenTextFile("plugins\\OpenWith\\associations.js")
  42.     text = rf.ReadAll()
  43.     result = eval(text)
  44.   catch e
  45.     #
  46.   finally
  47.     rf.close()
  48.   #
  49.   if fso.FolderExists(p0)
  50.     if "_folderhandler" of table
  51.       ext = "_folderhandler"
  52.   if ext of table
  53.     rule = table[ext]
  54.     theType = type(rule)
  55.     switch theType
  56.       when "string"
  57.         path = rule
  58.         obj =
  59.           key: path
  60.           text: path
  61.           path: path
  62.         results.addObject('FILE', path, obj)
  63.       when "array"
  64.         for path in rule
  65.           obj =
  66.             key: path
  67.             text: path
  68.             path: path
  69.           results.addObject('FILE', path, obj)
Title: Re: Qatapult
Post by: ecaradec on March 08, 2012, 04:44 AM
BTW, any chance of being able to use PgUp and PgDn for results navigation?
yes there is ;)
Title: Re: Qatapult
Post by: ewemoa on March 08, 2012, 06:40 AM
heres an attempt at an Alfred like skin (note i have never used it so its based on the screen shots I've seen)

I've been using it for a bit and noticed that to "get out of Qatapult" the number of times to type the escape key seems to be higher :)

Time to retrain the fingers and brain to use the hotkey may be...wonder how successful I'll be at that...
Title: Re: Qatapult
Post by: ecaradec on March 08, 2012, 07:03 AM
@ewemoa, I spotted that as well. This is because the first escape hide the results but in the alfred skin the results are always visible so that hides just nothing. The second esc should exit though.

I'll add a fix for that, I just need to figure exactly how to do it. I'll probably need to defer the escape key handling to the skin.
Title: Re: Qatapult
Post by: ecaradec on March 08, 2012, 02:37 PM
Hi, I'm in the middle of an PC update, I'm not sure I'll get my PC available this evening  :'(. Can't work on Qatapult.
Title: Re: Qatapult
Post by: ecaradec on March 08, 2012, 02:39 PM
Thinking about something else : Do you think it would be worthwhile that I ask mouser a child board ? This is a little bit of a mess here, would you like to be able to have your own thread of plugins and extensions ?
Title: Re: Qatapult
Post by: pigeonlips on March 08, 2012, 03:40 PM
I was wanting to suggest this too. Good idea. It would be great to split out all the topics. (talk on plugins, skins, features, bugs etc.....)
Title: Re: Qatapult
Post by: pigeonlips on March 08, 2012, 03:47 PM
Good spot by ewemoa - i thought something felt wrong but couldnt put my finger on what!

"I'll add a fix for that, I just need to figure exactly how to do it"

any way i can fix this in the skin? Tried adding "qatapult.resultsvisible" to the if that shows the results but no success. Also tryed playing around with the "qatapult.getArgValue(focus,"status")" and text and type = EMPTY and adding that to the if, but no sucess. Now ewemoa's pointed it out its really bothering me  :D
Title: Re: Qatapult
Post by: ecaradec on March 08, 2012, 05:36 PM
I don't think you can pigeonlips. I keep an internal state about the visibility of the results and I'm using it for handling the esc key. There is no way you could fix that on the side, and I'd rather you don't try because that would necessarily be tricky if you found something and that could be an ascendency compatibility issue.

Don't worry, I'll fix it soon.
Title: Re: Qatapult
Post by: pigeonlips on March 08, 2012, 10:19 PM
Hi All,

Here's another update to the skin in case anyone wants to play around with it over the weekend and see the progress.

took another pass over the code and cleaned it up - added a few things. Got the focus in the bottom to indicate where you are to work nicely. Also made it so that's it all nicely aligned and i am mostly happy with the position of the components as its all worked out with fantastic Maths! The configuration can be tweaked at the top of the js.

Its almost ready for the "final cut" but i want to hold off on this until i can set the background to the results box.

Enjoy

Title: Re: Qatapult
Post by: pigeonlips on March 09, 2012, 02:02 AM
Forgot to say - I really want to extend the skin with two things:

ID3 tag info -

and to use DWM (see this link - http://msdn.microsoft.com/en-us/library/windows/desktop/aa969521(v=vs.85).aspx) so that i can get it to draw the thumbnail of the window object.

Not sure how it will pan out, but incase i get anywhere fast with it, the first problem will be i dont have windows 7 to test if the DWM will work. . Anyone fancy being my gini-pig ?

Enjoy the weekend!
Title: Re: Qatapult
Post by: ecaradec on March 09, 2012, 06:46 AM
Win 7 previews are a very cool idea ! I can enable that for Win 7 for the WINDOW type.
Title: Re: Qatapult
Post by: ecaradec on March 10, 2012, 03:18 PM
Here is a new version. What's changed :
- I added support for creating commands in script. Add *.command.js files under the plugin folder, all the methods defined there are loaded into Qatapult and you can call them from the rules using the tag <script>. Define your rule like this :
       <rule>
            <arg>TEXT</arg>
<arg>
<item>
<lbl>Append to file</lbl>
<ico>icons\defaultverb.png</ico>
</item>
</arg>
            <script>appendtofile(qatapult.getArgValue(0,"text"),"plugins\\commands\\test.txt")</script>
</rule>
- The matching method is much improved : it now takes into account if the match is near the start of the word or if the query match characters consecutively and gives appropriate bonuses
- You can now use page up and page down to navigate the results
- You can configure the color of results with ui.resultBgColor, ui.resultFocusColor, and ui.resultScrollbarColor (because there is a scrollbar now ;) )
- You can also configure other like fontfamily, stringTrimming to change the font for various text in the skin. I'll extract a full doc.
- You can also take complete ownership of the rendering of the results and draw them exactly as you want them with a API similar to the one of the args. However the drawResult might be preferable unless you have some very specific idea. Here is an example that can be plugged into the alfred-like skin :
       var nbres=4;
        qatapult.setVisibleResults(nbres);
        for (var i = qatapult.firstResult; i < qatapult.firstResult + nbres; i++) {
            var y=65+(i-qatapult.firstResult) * 40;
            if(qatapult.focusedResult==i)
                ui.fillRectangle(SkinBorder,y,(SkinWidth/2)-SkinBorder,40, 0x88FF0000);

            if(qatapult.getResValue(i,"type")=="TEXT")
                ui.drawText(qatapult.getResValue(i,"text"),SkinBorder, y+2, (SkinWidth/2)-SkinBorder, 38);                
            else {            
                ui.drawResItem(i, SkinBorder, y, 40, 40);
                ui.drawText(qatapult.getResValue(i,"text"),SkinBorder+45,y+10,(SkinWidth/2)-SkinBorder-50,10);
            }
        }
Title: Re: Qatapult
Post by: ewemoa on March 11, 2012, 05:24 AM
Wow -- seems like lots of new goodies :)

Just a quick note...

- You can now use page up and page down to navigate the results

Thanks for this!  Working here so far with Windows 7 Pro 64-bit and XP Pro SP3.
Title: Re: Qatapult
Post by: ecaradec on March 11, 2012, 01:15 PM
I've found a small issue with the latest build and probably a few others. If you invoked a command on a result from the result list that is not the first, the bonus was assigned to the first item instead of the selected one.
Title: Re: Qatapult
Post by: ewemoa on March 14, 2012, 08:35 PM
- I added support for creating commands in script. Add *.command.js files under the plugin folder, all the methods defined there are loaded into Qatapult and you can call them from the rules using the tag <script>. Define your rule like this :
        <rule>
            <arg>TEXT</arg>
<arg>
<item>
<lbl>Append to file</lbl>
<ico>icons\defaultverb.png</ico>
</item>
</arg>
            <script>appendtofile(qatapult.getArgValue(0,"text"),"plugins\\commands\\test.txt")</script>
</rule>

I got part-way through a plugin for calculating MD5 checksums only to find that FileSystemObject doesn't appear to support working with binary files...
Title: Re: Qatapult
Post by: ecaradec on March 16, 2012, 12:19 PM
I had a look at it. I thought is would be possible to use the stream property, but there seem to be no access to bytes. There seems to be ways to do that with ADODB objects, but using properties of objects that are not made for that purpose is not really nice.
Title: Re: Qatapult
Post by: ecaradec on March 16, 2012, 04:04 PM
Also I've tried to read the registry though WMI calls and it was painfully slow... My original idea was that libffi was the solution. The issue was that it would be relatively long to implement.

However I've also found this activex component that might be easier to integrate as it already provide the activescripting binding :

http://www.borncity.com/web/WSHBazaar1/WSHDynaCall.htm

It's a script component that allows to do native call to dll. It's not as clean as libffi but if it works for you I might integrate that into Qatapult. That would make possible to build a javascript library to read files, etc... I've not tried it but as it's a component you should be able to play with it on you computer to evaluate if it's solve your problem.

If that works we could build a set of js libraries to call native functions more easily.

Let me know.
Title: Re: Qatapult
Post by: ewemoa on March 16, 2012, 05:42 PM
Thanks for the leads.  I hope to take a look soon.



I also came across ADODB.Stream, but didn't determine whether it's usable without extra installation.  I didn't try it, but found the following concerning byte-access:

  Read (http://msdn.microsoft.com/en-us/library/windows/desktop/ms676702%28v=vs.85%29.aspx)

Then there's access to characters:

  ReadText (http://msdn.microsoft.com/en-us/library/windows/desktop/ms678077%28v=vs.85%29.aspx)

It looks like at least one of these was used by:

  http://www.codeproject.com/Articles/17825/Reading-and-Writing-Binary-Files-Using-JScript



DynaCall looks promising!  Is it correct that using RegSvr32.exe is required to get it working?
Title: Re: Qatapult
Post by: ecaradec on March 16, 2012, 05:59 PM
Yes regsvr is required but this is for the short term. If it proves a viable solution I can integrate it inside Qatapult.
Title: Re: Qatapult
Post by: ewemoa on March 16, 2012, 06:27 PM
Thanks for the clarification.



Below is a short sample expanding on your example -- it uses the script capability via plugin.xml.

All it does is allows one to take one-line notes via "Add Line Note", and view them via the linenote catalog item.  (BTW, is there a way to specify the name that gets used for the catalog item apart from renaming the plugin directory?)

MD5: 8f82449b43a6d27ba63c2c9a09691d7d

Tested on Windows 7 Pro 64-bit.
Title: Re: Qatapult
Post by: ewemoa on March 16, 2012, 06:38 PM
However I've also found this activex component that might be easier to integrate as it already provide the activescripting binding :

http://www.borncity.com/web/WSHBazaar1/WSHDynaCall.htm

There appears to be a more recent modified version:

  http://glsft.free.fr/index.php?option=com_content&task=view&id=47&Itemid=33

I suspect you will have a much easier time understanding the article than me :)
Title: Re: Qatapult
Post by: ecaradec on March 16, 2012, 07:00 PM
I tried it and it works nicely.

I'm not sure about what you're trying to accomplish, but listing the items in you catalog can be accomplished by adding a extra rule that list objects from your collect source. It could be a rule like : List Notes,LINENOTE. This is the method I would favor as you can customise the icon etc...

When you'll type list notes, Qatapult will query all plugins for LINENOTE object. I'm not sure if this is a good idea or not you can also return TEXT object when rules expect TEXT and LINENOTE when then expect that.

I think there is something that is missing here, it should be possible to return multityped objects or something, because you can't really reuse LINENOTE objects as TEXT because they won't be recognized by rules as such... If you have some thoughts about that let me know.
Title: Re: Qatapult
Post by: ewemoa on March 16, 2012, 07:01 PM
DynaWrap worked for a simple case :)

Here is a rough summary of a test:

0. Download dynawrapNT.zip (http://www.borncity.com/web/WSHBazaar1/dynawrapNt.zip) and extract the dynawrap.dll file (MD5: ca218f1aa4bf60d5deacebe0f55a2f95).

1. As admin, run cmd.exe and in the directory containing dynawrap.dll execute:

RegSvr32.exe dynawrap.dll

2. In a .js file of some Qatapult plugin, appropriately add something like:

Code: Javascript [Select]
  1. // :)
  2.   var dw;
  3.   dw = new ActiveXObject("DynamicWrapper");
  4.   dw.Register("User32.dll", "MessageBoxA", "f=s", "i=hssu", "r=l");
  5.   dw.MessageBoxA(null, "Here is a test", "So?", 0);

3. Execute plugin functionality that calls the code added above.

4. Observe a message box.

Tested with Windows 7 Pro 64-bit and Windows XP Pro SP3.



The following was helpful:

  How to use DynamicWrapper? (http://winbatch.hpdd.de/MyWbtHelp/htm/20100125.HowTo.UseDynamicWrapper.htm)



Attached the dynawrap zip file for the time being.

MD5: a27c9c53fb22379463b6f2e3cb812d45
Title: Re: Qatapult
Post by: ewemoa on March 16, 2012, 09:58 PM
Not sure how to use DynaCall / DynaWrap in JScript for functions requiring pointers...e.g. ReadFile:

Code: C [Select]
  1. BOOL WINAPI ReadFile(
  2.   __in         HANDLE hFile,
  3.   __out        LPVOID lpBuffer,
  4.   __in         DWORD nNumberOfBytesToRead,
  5.   __out_opt    LPDWORD lpNumberOfBytesRead,
  6.   __inout_opt  LPOVERLAPPED lpOverlapped
  7. );

The more recent DynaWrap version mentioned earlier had the following:

FormatMessage (dwMessageId)                                          
GetBSTRAddr (String)                                                  
GetLastError ()                                                      
GetMemInBSTRAddr (dwBSTRAddr, dwOffset, nDataType)                    
GetRegistered ()                                                      
GetVariantAddr (Var)                                                  
Register (DllName, Win32Api, [TypeOfCall], [ReturnDT], [InputDT])    
SetMemInBSTRAddr (dwBSTRAddr, dwOffset, nDataType, Data)              
Version

I didn't think trying GetBSTRAddr would work, but I tried it anyway -- sadly without success.

Any ideas?
Title: Re: Qatapult
Post by: ecaradec on March 17, 2012, 07:10 PM
Correct, I can't get GetBSTRAddr to work either. May be that's a javascript issue as the component seems to be made to work with VBScript ? I asked the developer he doesn't mind to share his sources and we will not go really far without the sources.
Title: Re: Qatapult
Post by: ewemoa on March 17, 2012, 07:54 PM
Thanks for testing and the feedback :)

I'm not sure about what you're trying to accomplish, but listing the items in you catalog can be accomplished by adding a extra rule that list objects from your collect source. It could be a rule like : List Notes,LINENOTE. This is the method I would favor as you can customise the icon etc...

I'm feeling dense -- would you mind elaborating on what you mean by expressing it via a sample plugin.xml fragment?



I think there is something that is missing here, it should be possible to return multityped objects or something, because you can't really reuse LINENOTE objects as TEXT because they won't be recognized by rules as such... If you have some thoughts about that let me know.

I'm not sure I understand well, but may be the following code fragment is related:

To add to results currently:

Code: Javascript [Select]
  1. results.addObject('FILE', path, {'key': path, 'text': path, 'path': path});

it looks like only one type is specified.  May be there is some benefit in being able to specify multiple types for an object in this kind of context (perhaps with some way of a default being specified)?
Title: Re: Qatapult
Post by: ecaradec on March 22, 2012, 06:32 PM
Hello,

It has been long but native calls seems to work, at least in the cases I tried. I wrote a few basic functions to read and write from the registry. There is also a function to read a file, but it's meant to do binary reading not text so it's currently not as useful as FileSystemObject is. If you want to add new functions don't forget to get debugview (http://technet.microsoft.com/en-us/sysinternals/bb896647) up and running. It makes things easier, and don't forget you're going native so expects crashes as you fine tune your parameters.

Plugins can also require libraries using the keyword require so share your libraries, I'll add them to the lib directory of Qatapult.

Have a look at the Uninstall plugin (https://www.donationcoder.com/forum/index.php?topic=30404.new#new) which use natives functions to read the registry to get started.

And the Qatapult website has a new developer section with rudimentary documentation and an enhanced look : http://emmanuelcaradec.com/qatapult/
Title: Re: Qatapult
Post by: ewemoa on March 22, 2012, 10:31 PM
It has been long but native calls seems to work, at least in the cases I tried.

Woohoo!

And the Qatapult website has a new developer section with rudimentary documentation and an enhanced look : http://emmanuelcaradec.com/qatapult/

 :Thmbsup:

Hope to delve in soon :)
Title: Re: Qatapult
Post by: ewemoa on March 23, 2012, 04:41 AM
A side note...

If you want to add new functions don't forget to get debugview (http://technet.microsoft.com/en-us/sysinternals/bb896647) up and running. It makes things easier, and don't forget you're going native so expects crashes as you fine tune your parameters.

I use DebugView, but also JrDebugLogger (https://www.donationcoder.com/Software/Mouser/jrdebuglogger/index.html) :)
Title: Re: Qatapult
Post by: ewemoa on March 23, 2012, 10:33 PM
If you want to add new functions don't forget to get debugview (http://technet.microsoft.com/en-us/sysinternals/bb896647) up and running.

Seems to work well with:

Code: Javascript [Select]
  1. // trace (always useful, get debugview to view the result )
  2. trace(string str);

I can now replace use of text files for recording debugging info via FileSystemObject:

Code: Javascript [Select]
  1. outf.WriteLine("some message");

with:

Code: Javascript [Select]
  1. qatapult.trace("some message");

Thanks a lot for this -- extremely helpful!
Title: Re: Qatapult
Post by: ewemoa on March 25, 2012, 05:57 AM
It's nice how "Reload" (the command, not the image) now comes up here as the first result for "re" :)

Is there any way to tweak the scores of the objects added via plugins?  This would likely improve the usefulness of the OpenWith plugin -- at the moment, the objects added for that appear pretty close to the bottom of the results list and consequently I make repeated use of the PgDn key.

FWIW, I looked at:

  http://emmanuelcaradec.com/qatapult/?p=developers (http://emmanuelcaradec.com/qatapult/?p=developers)

but didn't see anything that looked relevant.
Title: Re: Qatapult
Post by: ewemoa on March 25, 2012, 06:32 AM
I'm thinking about how to display results of a plugin's execution.  Below are some ideas:

One simple way at the moment is using a dialog box via <script> in plugin.xml, require('lib/files.js'); and a function that calls DW.MessageBoxA(null, "Content", "Title", 0);  (As a side note, may be it's worth having MessageBoxW too?)

Perhaps some kind of balloon tip as well?  I'm not sure how much work that might be yet.

For execution results one might want to operate on again (e.g. calculation results, conversion results, transformed URLs, etc.) placing such text in the first pane (pane 0) seems appropriate -- is there a nice way to do that (apart from the AHK hack tested eariler)?
Title: Re: Qatapult
Post by: ecaradec on March 25, 2012, 07:58 AM
Is there any way to tweak the scores of the objects added via plugins?
It's possible to specify a bonus field to your results to boost it's score : addObject(type, {bonus:100}); A negative bonus would also works but I'm not sure if that's a good or bad idea.

As a side note, may be it's worth having MessageBoxW
Yes, just wrote it and I'll add it to the library. messagebox or msgbox would be a better name, I'd rather have simplified functions than the direct windows API as it will be easier for everyone.

For notifications, I think we should really offer some flexibility, might be we need a notify function that can have several behavior based on a settings so that the result can be handled by Qatapult, Growl or Windows, or something else.

About reoperating results, I agree with you. That's something I'd like to have several times as using qatapult. I'm wondering if what you want to place on the first pane is a typed result or just a text.
Title: Re: Qatapult
Post by: ecaradec on March 25, 2012, 01:34 PM
I've uploaded a new version, the main feature is a kind of a filter. Rule arguments can now match some subproperties of object. This is very useful to add extra methods to applications. I've created a putty plugin that add a connect method and that list the server configurations availables in the registry.

The syntax of the argument looks like that :
<arg>
  <type>FILE</type>
  <pred>rfilename=PUTTY.EXE</pred>
</arg>

The pred node is a filter that will make FILE only match if rfilename is putty.exe. The value name is flexible, you can test any value available on the object : path, text, icon, or any other custom value. The match is case insensitive.

There is also a regex predicate that you can enable by typing filename~=xxx . The important difference is the operator '~='. I think that it might be useful to propose custom actions if a text match a url like "http://" or an email or math expression (starting with = with only operator expression ? ). Regex tests are case sensitive too.

Title: Re: Qatapult
Post by: ecaradec on March 25, 2012, 02:28 PM
I uploaded a new version again that allows to display an object as a result of a script command. It only works within a script command, you can't use it at any other moment and it can only set the first pane object. You can do something like that :

qatapult.setInput({type:"FILE",text:"c:\\",path:"c:\\"});

or

qatapult.setInput({type:"TEXT",text:"hello"});
Title: Re: Qatapult
Post by: ewemoa on March 25, 2012, 05:43 PM
It's possible to specify a bonus field to your results to boost it's score : addObject(type, {bonus:100}); A negative bonus would also works but I'm not sure if that's a good or bad idea.

Thanks for this tip!  It seems to work well here :)

As far as negative bonuses go -- IIUC a similar thing may be done in FARR with useful results.
Title: Re: Qatapult
Post by: ewemoa on March 25, 2012, 05:47 PM
messagebox or msgbox would be a better name, I'd rather have simplified functions than the direct windows API as it will be easier for everyone.

I appreciate not having to think about appending A or W :)

For notifications, I think we should really offer some flexibility, might be we need a notify function that can have several behavior based on a settings so that the result can be handled by Qatapult, Growl or Windows, or something else.

That sounds like a good idea.

I'm wondering if what you want to place on the first pane is a typed result or just a text.

Initially I just thought text, but my brain is starting to wonder.  If any relevant-seeming ideas come up, I hope to pass them on.

Ah...I guess your latest version may have related functionality already :)

Thanks for the new version -- hope to try it soon!
Title: Re: Qatapult
Post by: ecaradec on March 26, 2012, 02:29 AM
It seems I wasn't clear, I confirm you that setinput is the way to set the pane arguments. I struggled to find a decent name for the function and as a result I'm not sure that the final choice is a good fit. This might really be a too much thought method name.  :P

I think that it was absolutly necessary that I set type to the results : just setting the input query would have been completly unreliable, as you could have end up with the wrong result like an extra filename on some other person computer.
Title: Re: Qatapult
Post by: ecaradec on March 29, 2012, 09:56 AM
Just thinking that one of the common uses for setInput would be when you zip a file, or do something else with a file to reopen Qatapult with the ouput file focused.
Title: Re: Qatapult
Post by: ecaradec on March 29, 2012, 11:53 AM
Do you mind if I change the name of setInput to setOutput ? I think it would be more appropriate.
Title: Re: Qatapult
Post by: ewemoa on March 29, 2012, 05:40 PM
No problem at all.  Please rename appropriately.
Title: Re: Qatapult
Post by: ewemoa on March 29, 2012, 05:44 PM
Just thinking that one of the common uses for setInput would be when you zip a file, or do something else with a file to reopen Qatapult with the ouput file focused.

Thanks for the example situation.

Along the lines of zipping / archiving, do you have any UI ideas how one might approach multiple files / folders being selected for zipping / archiving?  In QS, there was the "comma trick", but I'm wondering whether there might be better alternatives...
Title: Re: Qatapult
Post by: ecaradec on March 29, 2012, 06:16 PM
The comma trick seems good to me. I had a look to integrate that this WE. This is really a core change and there is well over 50 places where I must fix things, so I will really need some quiet time to plug that. I don't know what could make it better, I think that allowing Qatapult to be a drop target might be nice so that we could drop files directly from the explorer into Qatapult. I would certainly use that. If you have some other usage ideas, I'm listening.

As a status update, I'm doing two things right now :
- fix memory leaks (I unplugged my memory leak finder to find a bug and left it unplugged. Leaks are not easier to find in larger quantities ;) )
- implementing a paste using the new DynaWrapper code. I have working clipboard code for text already. I'm also discovering that this is not a very easy environnement to develop into, but may be it will be easier as I write more wrappers.



Title: Re: Qatapult
Post by: ewemoa on March 29, 2012, 07:12 PM
The comma trick seems good to me. I had a look to integrate that this WE. This is really a core change and there is well over 50 places where I must fix things, so I will really need some quiet time to plug that. I don't know what could make it better,

I don't know about the aesthetics of it, but the following display idea came up:

1. Press comma
2. Current pane extends vertically (like a stack?)

Just a random thought :)



I think that allowing Qatapult to be a drop target might be nice so that we could drop files directly from the explorer into Qatapult. I would certainly use that.

Same here!  Drop target would be great.  Also being able to drag from Qatapult would be nice too -- quickly find something with Qatapult for use elsewhere (until there's a plugin :) ).



One thing that I've wanted in FARR is the ability to drop items on to an individual result.  I have FARR configured to use "Blank search shows files from launch history..." -- and I've wanted to use that as a kind of dock to drop items on to, but last I checked, this doesn't work.  So certainly would be nice to have this in Qatapult!



As a status update, I'm doing two things right now :
- fix memory leaks (I unplugged my memory leak finder to find a bug and left it unplugged. Leaks are not easier to find in larger quantities ;) )
- implementing a paste using the new DynaWrapper code. I have working clipboard code for text already. I'm also discovering that this is not a very easy environnement to develop into, but may be it will be easier as I write more wrappers.

Wishing you luck in these matters...



By the way, what do you think of the idea of a command history like in command line shells?  IIRC, in bash and other *nix shells, Control-P / Control-N is used for previous command / next command.

If there were hooks for a plugin to register to execute code upon certain key sequences as well as a chance to operate on command content before Qatapult executes the command, I'd be interested in writing a plugin for command history :)
Title: Re: Qatapult
Post by: ewemoa on April 04, 2012, 08:01 PM
Do you mind if I change the name of setInput to setOutput ? I think it would be more appropriate.

On a related note regarding renaming -- I think in English, spelling for collector ends in 'or'.  When I did search, I found that in French there is a word that ends in 'er'.

May be you knew this already :)
Title: Re: Qatapult
Post by: ecaradec on April 05, 2012, 06:33 AM
I don't know about the aesthetics of it, but the following display idea came up:

1. Press comma
2. Current pane extends vertically (like a stack?)
I think, I'll let skins handle that. I was considering doing something similar to QS as a default : putting extra arguments icon under each items. But that's going to be totally customisable in others skins.

History is something you'd need probably more access that you currently have. The history I though was most interesting is an history of rules, I really think that objects are insufficient, you want to repeat an action usually, not get the previous object. However I totally like the idea, and this is going to find its way into Qatapult.

Collecter is a a mistake. Thanks.
Title: Re: Qatapult
Post by: ecaradec on April 05, 2012, 05:13 PM
I just spotted that autohotkey has a dll version http://www.autohotkey.net/~HotKeyIt/AutoHotkey/

Embedding that would allow to build scripts plugin directly with autohotkey.
Title: Re: Qatapult
Post by: ewemoa on April 05, 2012, 06:49 PM
FWIW, AutoHotkey.dll is what I've been using for at least one earlier Qatapult plugin -- the Calculate one.

For reference, below is a bit from Calculate.ahk:

Code: Autohotkey [Select]
  1. ; XXX: ScriptText should have #Persistent and a function def
  2. ;      Pass the script's text using ScriptText
  3. ;      Pass the name of the function in using FuncName
  4. RunFuncInScriptWithInputText(ScriptText, FuncName, InputText)
  5. {
  6.   ; XXX: before didn't need to muck with path...
  7.   AhkDll := AhkDllThread(A_ScriptDir . "\..\AHK\AutoHotkey.dll")
  8.   ;OutputDebug, % "Script content: " . ScriptText
  9.   AhkDll.ahkTextDll(ScriptText)
  10.   OutputDebug, % "Value passing to script: " . InputText
  11.   Result := AhkDll.ahkFunction(FuncName, InputText)
  12.   OutputDebug, % "Script returned: " . Result
  13.   AhkDll.Terminate()
  14.   Return Result
  15. }
  16.  
  17. Calculate(InputText)
  18. {
  19.   FuncName := "Calculate"
  20.   ScriptText := "#Persistent`n`n"
  21.               . "#NoTrayIcon`n`n"
  22.               . FuncName . "()`n"
  23.               . "{`n"
  24.               . "  Result := " . InputText . "`n"
  25.               . "  Return % Result . A_Space`n" ; XXX: convert to string
  26.               . "}`n"
  27.   Result := RunFuncInScriptWithInputText(ScriptText, FuncName, InputText)
  28.   Result := RTrim(Result)
  29.   ; XXX: consider whether to modify trailing zeros
  30.   Return Result
  31. }

AutoHotkey.dll aside
AutoHotkey.dll has some nice features and the developer (HotKeyIt) is usually pretty responsive about bug reports, but docs for his things are not always up-to-date.

Title: Re: Qatapult
Post by: ecaradec on April 09, 2012, 05:18 PM
I've uploaded a new version. This is the ground for the future settings ui that should be more usable. You can now enable and disable plugins from the UI. There is also a ton of less memory leaks.

There are new functions that you can use by doing a require("lib/clipboard.js") : they are clip and paste. Paste can optionally take a text to paste. You can also do a sendinput but it's currently limited to printable characters only. If you feel like improving it, I'll be happy to take your version and put it in Qatapult.

Both functions are built with direct call to win32 dll from javascript using the dynamic wrapper. Have a look to clipboard.js in lib if you want to see what it looks like.

There is a new jsmath plugin that eval javascript as a way to evaluate mathematical expression. Start a query with = on the first pane to trigger it. It work well but doesn't handle the display exactly the way I would like : The perfect thing ihmo would be to have a custom display on the first pane that display both the expression and the result, then a second pane with the operation. The current thing use 3 panes. I think that it might  be worthwhile that we use some specially named values that skins could detect and handle display for a large number of types instead of handling types individually like we do today : skins could be more versatile that way ihmo.

I've also fixed the collecter things as ewemoa suggested => please use now collector.js for your plugins now.
Title: Re: Qatapult
Post by: ewemoa on April 09, 2012, 05:42 PM
I've uploaded a new version. This is the ground for the future settings ui that should be more usable. You can now enable and disable plugins from the UI. There is also a ton of less memory leaks.

Thanks for the new version!

Just a quick note -- I no longer see "Quit" or "Reload".  This is with a fresh install on Windows XP SP3.

Any ideas?
Title: Re: Qatapult
Post by: ewemoa on April 09, 2012, 05:48 PM
There are new functions that you can use by doing a require("lib/clipboard.js") : they are clip and paste. Paste can optionally take a text to paste. You can also do a sendinput but it's currently limited to printable characters only. If you feel like improving it, I'll be happy to take your version and put it in Qatapult.

Both functions are built with direct call to win32 dll from javascript using the dynamic wrapper. Have a look to clipboard.js in lib if you want to see what it looks like.

There is a new jsmath plugin that eval javascript as a way to evaluate mathematical expression. Start a query with = on the first pane to trigger it. It work well but doesn't handle the display exactly the way I would like : The perfect thing ihmo would be to have a custom display on the first pane that display both the expression and the result, then a second pane with the operation. The current thing use 3 panes. I think that it might  be worthwhile that we use some specially named values that skins could detect and handle display for a large number of types instead of handling types individually like we do today : skins could be more versatile that way ihmo.

Looking forward to checking these bits out...however, I don't see them in the latest zip.  I tried downloading with 2 browsers but didn't notice any difference.  For reference, the MD5 of what I ended up with was:

  MD5: 7a416eb360fcbd53dcfc1e672f575839

What am I missing?
Title: Re: Qatapult
Post by: ecaradec on April 09, 2012, 05:59 PM
Oups, I forgot to say that I moved all Qatapult verbs under the Qatapult file : type Qatapult and look at the available verbs
Title: Re: Qatapult
Post by: ecaradec on April 09, 2012, 06:02 PM
Thanks for spotting the missing plugins, they were still excluded from the package. The last version should contain all of them.
Title: Re: Qatapult
Post by: ewemoa on April 09, 2012, 07:52 PM
...the missing plugins, they were still excluded from the package. The last version should contain all of them.

I see them now.  Thanks!
Title: Re: Qatapult
Post by: ewemoa on April 09, 2012, 07:56 PM
I moved all Qatapult verbs under the Qatapult file : type Qatapult and look at the available verbs

I typed 'qatapult' (no quotes) and I see three results in pane 0:


None of the associated verbs for any of these (in pane 1) appears to be 'Quit' nor 'Reload'.  May be I misunderstood?

FWIW, the currentversion.txt file contains:

  20120410010112

and MD5 of the zip file is:

  614f0ec74c5ccdf48b6af2574d341858
Title: Re: Qatapult
Post by: ewemoa on April 09, 2012, 08:59 PM
please use now collector.js for your plugins now.

FWIW, in the latest download, I see the following file names:


Also, in Qatapult\Lib there is FileGetVersionInfo.ahk -- I think this is unnecessary.
Title: Re: Qatapult
Post by: ewemoa on April 09, 2012, 09:11 PM
There is a new jsmath plugin that eval javascript as a way to evaluate mathematical expression. Start a query with = on the first pane to trigger it.

I like that I get an immediate result displayed  :Thmbsup:

=Math.sin(Math.PI)

Now how to get a history thing working...

BTW, any chance of functionality for clearing the current pane's input?  May be there is already something...
Title: Re: Qatapult
Post by: ewemoa on April 09, 2012, 09:13 PM
There are new functions that you can use by doing a require("lib/clipboard.js") : they are clip and paste. Paste can optionally take a text to paste. You can also do a sendinput but it's currently limited to printable characters only. If you feel like improving it, I'll be happy to take your version and put it in Qatapult.

Both functions are built with direct call to win32 dll from javascript using the dynamic wrapper. Have a look to clipboard.js in lib if you want to see what it looks like.

I found clibpboard.js and test.command.js in plugins\commands -- taking a look now.

Thanks for this example code.
Title: Re: Qatapult
Post by: ewemoa on April 10, 2012, 06:23 AM
In plugins\commands\clipboard.js there are a few lines that I don't understand well.  Please explain what the following were meant to do:

Code: Javascript [Select]
  1. for(var a in args[i]) { break; }

Code: Javascript [Select]
  1. this.length+=desc[t].size;

For the second bit, I don't see any desc anywhere else in the file.  I see that Struct is defined in lib\stdutils.js, so may be I should be ignoring some or all of clipboard.js?
Title: Re: Qatapult
Post by: ecaradec on April 11, 2012, 06:39 AM
About the collecter plugins, I feared that people would copy plugins folder over the old one without deleting the previous one. That's what I do actually. I feared that it would lead to entries being duplicated so I just leaved collecter for the moment. However if you create a new plugin collector.js is the correct name to use. Just thinking about it, I think that I could let qatapult rename theses files for consistency.

Reload, Quit and Options should now appears under the Qatapult entry. Here is what I got :
[ You are not allowed to view attachments ]
Is it different from what you have ewemoa ?

I agree with you about the history ewemoa. I was considering doing a global history. May be there should be some way to narrow the history to things that have the same start as the current selection so that we could get an history of math results and an history of operations on some file.

You're right about clipboard.js. It should be there. It's actually useless as it's not loaded. It doesn't do anything. The whole code about clipboard is in test.command.js that I should probably rename. I probably considered that it should only be called by command plugins so there wasn't too much needs to put it available as a library. I'm not sure if that's a good choice.

this.length+=desc[t].size;
clipboard.js is actually useless, this code is incorrect.

for(var a in args) { break; }
This is a trick to have a take the value of the first available item. I iterate once then exits. It do that because I describe types of the Struct function as an array of object : [{key:value}]. This line allows me to get the name of the key. I don't know of any other way to get that in javascript.
Title: Re: Qatapult
Post by: ewemoa on April 11, 2012, 06:19 PM
Thanks for the response :)

Reload, Quit and Options should now appears under the Qatapult entry.

...

Is it different from what you have

Yes.  I get:

[ You are not allowed to view attachments ]
Title: Re: Qatapult
Post by: ewemoa on April 11, 2012, 06:21 PM
I was considering doing a global history. May be there should be some way to narrow the history to things that have the same start as the current selection so that we could get an history of math results and an history of operations on some file.

Narrowing / filtering history sounds like an interesting idea.  May be it's worth trying if it's easy to implement.
Title: Re: Qatapult
Post by: ewemoa on April 11, 2012, 06:45 PM
Thanks for the explanations regarding the 2 bits of code.

Regarding the "for in" construct, I remember something about possible problems in some circumstances if hasOwnProperty is not used to check that an iterated key is not inherited.  I'm not sure of what the precise details are, but FWIW, the following is from the Options page of jshint (http://www.jshint.com/options/):

This option requires all for in loops to filter objects' items. The for in statement allows for looping through the names of all of the properties of an object including those inherited throught the prototype chain. This behavior can lead to unexpected items in your object so it is generally safer to always filter inherited properties out as shown in the example:

for (key in obj) {
  if (obj.hasOwnProperty(key)) {
    // We are sure that obj[key] belongs to the object and was not inherited.
  }
}

For more in-depth understanding of for in loops in JavaScript, read Exploring JavaScript for-in loops (http://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/) by Angus Croll.

I wonder if it is relevant in this case.
Title: Re: Qatapult
Post by: ecaradec on April 12, 2012, 06:15 AM
Thanks for the explanations regarding the 2 bits of code.
No pb.

About the for in construct, yes it can be annoying if it match some extra properties defined on prototype object. I will avoid to do that, it is somewhat seen as a bad practice now because of such issues.
Title: Re: Qatapult
Post by: ecaradec on April 12, 2012, 06:16 AM
I think that your version of Qatapult.exe is old, it probably didn't copied correctly or something like that. The new version has an hi-resolution icon when you focus it.
Title: Re: Qatapult
Post by: ewemoa on April 12, 2012, 06:20 AM
I think that your version of Qatapult.exe is old, it probably didn't copied correctly or something like that. The new version has an hi-resolution icon when you focus it.

I will try again, but I tend to install from scratch before testing.

I was using Windows XP Pro SP3 -- perhaps that's related?
Title: Re: Qatapult
Post by: ewemoa on April 12, 2012, 06:25 AM
The MD5 of the zip file I just downloaded is:

  614f0ec74c5ccdf48b6af2574d341858

FWIW, I tried with FF and IE and got zip files with the same MD5 checksums.

I got the same results for pane 1 with pane 0 being Qatapult.exe.
Title: Re: Qatapult
Post by: ecaradec on April 12, 2012, 07:37 AM
I didn't thought about the XP thing. It's just normal that you don't see an hires icon on XP. It's probably ok then, may be it's an xp thing. I'll try on XP
Title: Re: Qatapult
Post by: ewemoa on April 12, 2012, 08:43 AM
In case it wasn't clear, what I meant by getting the same results was that I still don't see Reload and Quit.

Sorry if that was confusing.
Title: Re: Qatapult
Post by: ecaradec on April 15, 2012, 01:53 PM
ewemoa can you check this version http://emmanuelcaradec.com/qatapult/bin2/ewemoa_Qatapult.exe

I added traces to detect what's your issue, you should get a line like that if everything is ok :
Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true

Also chrome is reporting this as potentially harmful. I checked it against virus total and everything is ok. That's a false check, might be coming from the weird name ?
Title: Re: Qatapult
Post by: ecaradec on April 15, 2012, 01:57 PM
I've also uploaded a new version that has a combobox for selecting skin. This is a powerful feature of Qatapult, it was too badly hidden.

Also did I say that you can now enable and disable plugins from the settings UI. I can't really find that in my comments ?
Title: Re: Qatapult
Post by: ewemoa on April 15, 2012, 08:21 PM
can you check this version http://emmanuelcaradec.com/qatapult/bin2/ewemoa_Qatapult.exe

I added traces to detect what's your issue, you should get a line like that if everything is ok :
Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true

I tested with Windows 7 Pro 64-bit and what I see via DebugView is:

[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false
[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false
[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false
[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false
[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false
[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false
[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false
[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false
[204] Testing equal predicate :  = QATAPULT.EXE => false
[204] Testing equal predicate :  = PUTTY.EXE => false

What I did was to bring up Qatapult, type 'qat', press down to select Qatapult.exe and press tab.
Title: Re: Qatapult
Post by: ewemoa on April 15, 2012, 08:23 PM
Also chrome is reporting this as potentially harmful. I checked it against virus total and everything is ok. That's a false check, might be coming from the weird name ?

I don't know -- FWIW, I checked with jotti.org and that didn't report any problems.
Title: Re: Qatapult
Post by: ewemoa on April 15, 2012, 08:29 PM
I've also uploaded a new version that has a combobox for selecting skin. This is a powerful feature of Qatapult, it was too badly hidden.

I appreciate this feature -- thanks!

On a related note, it feels a bit odd that the 'default' skin does not appear to be the default ;)

Also did I say that you can now enable and disable plugins from the settings UI. I can't really find that in my comments ?

I don't remember reading about it.  Definitely appreciate this too  :Thmbsup:
Title: Re: Qatapult
Post by: ewemoa on April 16, 2012, 03:26 AM
Just performed a similar test with Windows XP Pro SP3 and got:

[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
[2960] Testing equal predicate :  = QATAPULT.EXE => false
[2960] Testing equal predicate :  = PUTTY.EXE => false
Title: Re: Qatapult
Post by: ecaradec on April 16, 2012, 05:13 AM
can you check with putty if you have it ?
Title: Re: Qatapult
Post by: ecaradec on April 16, 2012, 05:18 AM
It seems that the resolving the shortcut doesn't work.

The way this feature works is that I compare rfilename to QATAPULT.EXE, in your case rfilename is empty. I'll probably ask your help for another test.
Title: Re: Qatapult
Post by: ewemoa on April 16, 2012, 06:08 AM
can you check with putty if you have it ?

I don't use putty, but I got it temporarily and did similar tests.  The results were:

[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false
[2572] Testing equal predicate :  = QATAPULT.EXE => false
[2572] Testing equal predicate :  = PUTTY.EXE => false

This was with Windows XP Pro SP3.
Title: Re: Qatapult
Post by: ewemoa on April 16, 2012, 06:12 AM
It seems that the resolving the shortcut doesn't work.

This was a good hint.

I created a shortcut to Qatapult.exe and got the shortcut to appear in pane 0 -- that made it so that Quit and Reload appear in pane 1.

Output from DebugView included:

[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false
[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false
[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false
[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false
[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false
[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false
[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false
[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false
[2920] Testing equal predicate : QATAPULT.EXE = QATAPULT.EXE => true
[2920] Testing equal predicate : QATAPULT.EXE = PUTTY.EXE => false

What had been appearing in pane 0 here until this test was not a shortcut.

Does this help at all?
Title: Re: Qatapult
Post by: ecaradec on April 16, 2012, 07:06 AM
I'm not sure, getting the filename from a shortcut is a bit of work, it might fail at several places. Were you focusing the Qatapult shortcut previously ?

If that's the case, then I would bet on some rights preventing the resolution of the filename. The easiest to solve that issue is that I build a new instrumented build for you.
Title: Re: Qatapult
Post by: ecaradec on April 16, 2012, 07:11 AM
I've the same issue, don't worry about that anymore. I thought I was resolving a shortcut but I was directly pointing on the exe. I'll solve that quickly.
Title: Re: Qatapult
Post by: ecaradec on April 16, 2012, 05:26 PM
It should work now ewemoa. Can you confirm ?

I also changed the documentation that stated that the default hotkey was ctrl+space when it always had been shift+space...
Title: Re: Qatapult
Post by: ewemoa on April 16, 2012, 06:09 PM
For Qatapult.exe, I still don't see Quit or Reload in pane 1.

For a shortcut to Qatapult.exe, I see Quit and Reload in pane 1.

The MD5 for the downloaded zip was:

  a1e9279e2bc5c1836ada41fcd9514f91

I did see the updated documentation stating that the default hotkey is shift+space.

The tests were done with Windows 7 Pro 64-bit with a fresh download of Qatapult.
Title: Re: Qatapult
Post by: pigeonlips on April 18, 2012, 06:05 PM
wow - been a way a while.

Just downloaded the new version :) am very happy :)

Not read over everything i have missed so far but can report that i have the same problem as ewemoa.

#>If i create a shortcut to qatapult.exe called "scqatapult.exe" an select that one in the first pane it works fine( i see reload, quit etc).
#>If i select the actual exe just get the default verbs.

Also noted another thing:

#> The catalogs dont seem to work. If you type "(CAT" pick one from pane 1 you can open it but not action anything?
#> textex just pastes text. Can be fixed by changing line 13 to " <script>paste(qatapult.getArgValue(0, "status"))</script> "

I was a very nice surprise to see my skin bundled in the zip when i downloaded the new version. forgot that i finished a better version but forgot to add it here before i went.  Heres a much nicer one. Feel free to replace the old one!

(http://s18.postimage.org/b8zqb05md/alfred.jpg) (http://postimage.org/image/b8zqb05md/)


Looking forward to playing the new version of qata more. so far its looking great!

Much love
Title: Re: Qatapult
Post by: ewemoa on April 18, 2012, 07:12 PM
Welcome back pigeonlips :)

Successfully tried out your updated alfred-like skin  :up:
Title: Re: Qatapult
Post by: ecaradec on April 22, 2012, 05:10 AM
Welcome back pigeonlips,

I'm trying your new skin and it will be included in my next release.
Title: Re: Qatapult
Post by: pigeonlips on April 23, 2012, 07:28 PM
nice thanks.

couple of things .

Typo in my last comment.

#> textex just pastes text. Can be fixed by changing line 13 to " <script>paste(qatapult.getArgValue(0, "status"))</script> "

lol textex just pastes "Test" - pasting text doesnt sound to bad.

Also i'm working on another skin. Don't know if its something that's just affecting me, or by design but i can not draw anything > 600

eg
ui.fillRectangle(0, 0, 1680, 50, 0x88FFFFFF);
ui.drawInput(10,10, 1680, 50);

tried all sorts of widths but it looks like i can only get up to 600? ANything over this causes the fillrectangle to just draw a box 600 in w, draw input stops displaying after 600. I only ask as I was going to try my hand at a new skin that expands the whole monitor.

Title: Re: Qatapult
Post by: ecaradec on April 24, 2012, 04:24 AM
You're correct, 600 is currently the size of the window. I need to detect the largest thing that is displayed to enlarge it on demand. However you need to know that I keep a buffer of the whole window in memory and Windows needs to do the same for this kind of window : a very large window could potentially be slow and eat a lot of memory, so that kind of skin might be impratical on some PC.

Still, I would love to see what you have in mind. Ask if you need something, I'll try to find a way.
Title: Re: Qatapult
Post by: ecaradec on May 02, 2012, 02:01 PM
Just a word to keep you informed of changes :

I'm trying to add multiple object selection. It partially works, but I still need to add some extra changes. This is a bit long, because it involves changing the structure of Qatapult a bit, but this is just normal code clean up. It has to happens sometimes.

I've made a fix to allow to create skins larger that 600, but for the precedent reason, I can't release right now.
Title: Re: Qatapult
Post by: ecaradec on May 02, 2012, 02:01 PM
Also I've fixed that paste issue in the textex plugin... Thanks pigeonlips.
Title: Re: Qatapult
Post by: ecaradec on May 02, 2012, 02:27 PM
I'm considering changing the way Qatapult handle the display of text items. TEXT items currently draw a text when you call drawItem. I think that this wasn't a very good decision as the current behavior force all skins to consider TEXT as rendering in the icon space.

The change would make drawItem draw a standard icon for TEXT objects, then skins would be free to either render the icon OR to draw only the text of the object at the place, font, margin and text aligment they prefer.

What do you think ?
Title: Re: Qatapult
Post by: ewemoa on May 02, 2012, 05:37 PM
I'm trying to add multiple object selection. It partially works, but I still need to add some extra changes. This is a bit long, because it involves changing the structure of Qatapult a bit, but this is just normal code clean up. It has to happens sometimes.

Sounds promising!  Thanks for keeping us informed  :Thmbsup:
Title: Re: Qatapult
Post by: ecaradec on May 02, 2012, 05:44 PM
Ewemoa may be you could answer this too : I've an issue with the 'current selection' proxy. I don't know if it should be considered one object or several. If I handle it as a single object that would mean that it's whole selection can be canceled with one 'esc', if I handle it as multiple objects a large selection could be very painful to cancel.

Do you know how QS handle this ?
Title: Re: Qatapult
Post by: ewemoa on May 02, 2012, 06:22 PM
Although I remember being able to work with multiple objects via the comma trick, I don't remember whether multiple objects could be handled via a current selection proxy.  I guess it's possible that they weren't handled.

Would it help at all if there were a default number of objects to handle and allow this to be configured by the user?
Title: Re: Qatapult
Post by: ewemoa on May 02, 2012, 07:06 PM
Did some light testing in kupfer.  It appears that in kupfer, there is a notion of currently selected files.

Rereading your post, I'm not sure I understand what you mean by 'esc' canceling the selection.  Do you mean that pressing 'esc' cancels the selection outside of Qatapult in for example Windows Explorer?
Title: Re: Qatapult
Post by: ecaradec on May 23, 2012, 06:34 PM
Hello, it has been a bit long since the last update, but Qatapult is going on again : I had a neck ache after jumping badly on a trampoline, not that serious but it was painful enough that I couldn't work too much for some time... among others things. Don't worry everything is ok now ;)

I've uploaded a new version that support multi elements arguments. The way it works is that you can CTRL+Enter on a argument, then it'll stack on the current arg. The default File commands 'Open', 'Delete', etc... handle this by running the command on each item, but you can define how you want your action to handle it :
As an example you could use it to create zip commands and things like that that operate on many files in one command. You can try it on File object in the first pane.

A quick way to multiple select files is to drop Files over the Qatapult interface from the file explorer. Qatapult will accept them when it's appropriate.

Rules define which argument can use multi. You can enable any argument to do that by adding a multi attribute to the argument type tag. Once a type is stacked, you can only stack objects of the same sort and only rules that support multi items will show up in the next pane. Here is how to define a rule that enable multi on the first arg :
<rule>
<arg multi="1">TEXT</arg>
<arg>
<item>
<lbl>Append to file</lbl>
<ico>icons\defaultverb.png</ico>
</item>
</arg>
<script>for(var i=0;i<qatapult.getArgItemCount(0);i++) appendtofile(qatapult.getArgValue(0,i,"text"),"plugins\\commands\\test.txt")</script>
</rule>

I've also added a dialog box that warn you if there is a new Qatapult version available, so you won't need to come back here again and again to check if your version is up to date.
Title: Re: Qatapult
Post by: valrus on May 24, 2012, 10:46 AM
Just tried to download it. It appears the main download link (http://emmanuelcaradec.com/qatapult/bin/currentversion/Qatapult.zip) is broken? (I get "The requested URL /qatapult/bin/currentversion/Qatapult.zip was not found on this server.")
Title: Re: Qatapult
Post by: ecaradec on May 24, 2012, 04:09 PM
Thanks ! This is fixed.

Nice to see you here.