topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday October 10, 2024, 10:29 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: AltTab / FScript problem  (Read 5560 times)

PabloG

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
AltTab / FScript problem
« on: March 19, 2011, 11:31 AM »
Hi all, that's my first post on this forum!

I've been using FARR from more than two years, and is a great program!  :Thmbsup:
I had no problems so far, but when I migrate from WinXP-32 to Win7-64 several FARR plugins
stop working, the pluginlog.txt file says something like:

Code: Text [Select]
  1. Error initializing plugin do_init function
  2. E:\PortableApps\FARR\Plugins\FarrAltTab\FARRAltTab.dll

The most important -for me- is the AltTab plugin, then I tried to recreate the plugin using
FScript. I manage to obtain the list of active processes using WMI and displaying that
list with emitResult (even with the respective icons), but the onProcessTrigger function
never fires when I select the element with Return or via mouse.

Looking previous posts, I tried several onProcessTrigger parameter lists:

Code: Javascript [Select]
  1. function onProcessTrigger(path, caption) {
  2. function onProcessTrigger(path, caption, groupname, pluginid, thispluginid, score, entrytype, args, triggermode) {
  3. function onProcessTrigger (path, caption, groupname, pluginid, thispluginid, score, entrytype, voidp) {

Also tried with onProcessTriggerV2, no luck.

Code: Javascript [Select]
  1. function onProcessTrigger(path, caption, groupname, pluginid, thispluginid,score, entrytype, args, triggermode) {
  2.           FARR.debug("Path: " + path + "; Caption: " + caption + "; GroupName: " + groupname + "; PluginID: " + pluginid + "; ThisPlugin: " + thispluginid + "; Score: " + score + "; EntryType: " + entrytype + "Args: " + args + "; TriggerMode: " + triggermode);
  3.           FARR.setStrValue("DisplayAlertMessage", caption + " " + path);
  4.        
  5.           return HANDLED + CLOSE;
  6.         }

I'm using the 1.20.0 version of FScript.dll, tried with FScript2 but it hangs FARR displaying
a lot of error popups (error creating the proxy, if I recall correctly).
The FARR version is v2.96.01 (the latest, I think).

Any ideas?
TIA,
Pablo

PD: sorry for my english, I'm no native speaker  :-[

« Last Edit: March 19, 2011, 11:37 AM by PabloG »

PabloG

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: AltTab / FScript problem
« Reply #1 on: March 29, 2011, 01:54 PM »
Anyone?? I've using Alt+Tab for a month with nearly 20 open programs, and my Tab key is dying!  :(

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AltTab / FScript problem
« Reply #2 on: March 29, 2011, 02:20 PM »
Sorry for delay..
you are on the right track i'm sure -- but this will require the fscript experts since it's a bit beyond me.

HOWEVER, i do know there are multiple versions of fscript.dll and an older one can cause this.  leave fscript2 alone for now as it's something different.
see if you can find the official latest fscript.dll and replace the alttab one with it.

PabloG

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: AltTab / FScript problem
« Reply #3 on: March 29, 2011, 05:21 PM »
@Mouser: hi, thanks for answering. Your program rocks!  ;)

The FScript version I'm using is 1.20.0, downloaded from
http://e.craft.free....r/farr/FScript/1.20/

My problem is that the onProcessTrigger never fires.
I'm adding the results with:

Code: Javascript [Select]
  1. FARR.emitResult(querykey, querynokeyword, querynokeyword, iconfilename, PLUGIN, IMMEDIATE_DISPLAY, scorestr);

If I add the results with UNKNOWN or FILE (0 / 1) then FARR (re) run the selected result; my idea was
to process that result in onProcessTrigger, bringing the selected program to foreground and returning
HANDLED from the function.

Is there's a newer version of FScript or a more specific FScript sub-forum where I can ask?

TIA,
Pablo

ecaradec

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 410
    • View Profile
    • Blog & Projects
    • Read more about this member.
    • Donate to Member
Re: AltTab / FScript problem
« Reply #4 on: March 31, 2011, 07:11 AM »
Whoops, I missed that thread,
There is a set of sample for fscript here :http://e.craft.free.fr/farr/FScript/samples/FScriptSample.rar
and a documentation here : http://e.craft.free....rr/FScript/help.html

There is an fscript.trigger.js sample inside. Try picking it, renaming it into fscript.js. It's a basic sample that increase a counter on each trigger.

If this doesn't work try disabling all plugins but this one inside FARR to detect if there is a conflict of some sort.
Blog & Projects : Blog | Qatapult | SwiffOut | FScript

PabloG

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: AltTab / FScript problem
« Reply #5 on: March 31, 2011, 09:30 PM »
@ecaradec: thanks for answering, your plugin also rocks!
You are lowering the bar for plugin writers, keep up the good work!

I downloaded your sample, same result:

* Downloaded FScriptSample.rar
* Unpacked on e:\PortableApps\Farr\Plugins\AltTab2
* Checked the Fscript.dll version (1.17.0.0, older than the 1.20.0.0 I was previously using)
* Enable the plugin (with FARR hotkey, aplugins, Find and Reload)
* Set the plugin alias (tab)
* Disabled all the other plugins
* Restarted FARR
* Pop up FARR again, type tab to start the plugin
* Result: Hello0, no matter how many times I clicked over the result or press return over it.
* Added:

Code: Javascript [Select]
  1. FARR.setStrValue("DisplayAlertMessage", "init");

in onSearchBegin and

Code: Javascript [Select]
  1. FARR.setStrValue("DisplayAlertMessage", "trigger");

in onProcessTrigger

* Result: the init popup fires always when I press FARR hotkey plus alt.
The trigger popup doesn't fire, nor selecting the result with cursor keys,
the mouse or the numpad keys.

A strange thing, when I restart FARR and clicked over the Hello0 result,
the first time the FARR window closed, but after reloading the plugins,
when I clicked over Hello0 the FARR window stays open.

Any ideas?
TIA
« Last Edit: March 31, 2011, 09:44 PM by PabloG »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: AltTab / FScript problem
« Reply #6 on: March 31, 2011, 10:16 PM »
ecaradec had good advice here:
If this doesn't work try disabling all plugins but this one inside FARR to detect if there is a conflict of some sort.

remove all your other plugins other than the test one -- it's very possible that one plugin could be improperly telling farr that it has "handled" the trigger and thus prevent other plugins from having their OnProcessTrigger function called.

PabloG

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: AltTab / FScript problem
« Reply #7 on: April 01, 2011, 07:29 AM »
@mouser:

yeah, I disabled all the other plugins and restarted FARR before
testing.

I was wondering if maybe the OS could be the problem
-I'm using Win7 64-bit-, then I tested the script in a VirtualBox
VM with WinXP SP3 32-bit (where the standard Alt+Tab plugin
works fine): downloaded and installed the latest FARR, copied
the Plugins\AltTab2 folder, enabled the plugin, same result.

TIA,
Pablo