ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Ecaradec's Software


<< < (59/67) > >>

please use now collector.js for your plugins now.
-ecaradec (April 09, 2012, 05:18 PM)
--- End quote ---

FWIW, in the latest download, I see the following file names:

* jsmath.collecter.js
* putty.collecter.js
* snippets.collecter.js
* uninstall.collecter.js
Also, in Qatapult\Lib there is FileGetVersionInfo.ahk -- I think this is unnecessary.

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.
-ecaradec (April 09, 2012, 05:18 PM)
--- End quote ---

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...

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.
-ecaradec (April 09, 2012, 05:18 PM)
--- End quote ---

I found clibpboard.js and test.command.js in plugins\commands -- taking a look now.

Thanks for this example code.

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 ---for(var a in args[i]) { break; }

--- Code: Javascript ---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?

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 :
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.

--- End quote ---
clipboard.js is actually useless, this code is incorrect.

for(var a in args) { break; }
--- End quote ---
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.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version