FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

couchpotato: InputPad (mouse,keyboard,magnifier) [N73]SCRIPT

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
bB
Newbie


Joined: 23 Apr 2009
Posts: 13

PostPosted: Thu Apr 30, 2009 3:48 pm    Post subject: couchpotato: InputPad (mouse,keyboard,magnifier) [N73]SCRIPT Reply with quote

Hi all,

part one of my contribution to myself and this community is here!
Please read the script, it says more than I will here; but a little info:
[quote="InputPad - [i](a combination of 'writer.js' & 'tvtuner.js' & some handywork)[/i]"]
*Written for Nokia N73, but should work with most others; otherwise small changes will make it so, if you're so inclined. (likely only thing you'd change is the camera button "F882")
*script enables text input with feedback on display. [mode B]
*script enables mousecontrol. [mode A]
*easy switch mode A-B by pressing 'camera_shutter_button' on phone.
*will launch 'magnify.exe' upon opening, and close it upon exit.
*black background, less obtrusive & more comfortable. (place image in same dir) [do mind; it's not really a pretty solution, but it [b]is[/b] dark]
*tip* for in explorer, mode B; use click (enter) and 'c' (backspace)
[/quote]
[disclaimer] Might cause lack of (mental)focus by slowing down your productivity; moving the mouse around takes about 20x longer than if you'd do it physically..
[quote]
Credit where credit is due; i.e. all constructive posters on this forum, past&present.

Either way, without further ado; enjoy.
I will. =]
[/quote]


<:questions:>
[quote="1-X"]Anyone having a bright idea on a more productive mouse algorithm? //SOLVED, so far.[/quote]
[quote="2-"]Should magnify be left running but minimized on script_exit, and restored on script_start?
(in that case, anyone who already knows how to have sc/js minimize/restore windows windows might tell me how, saves me the search)[/quote]
[quote="3-"]What would be the most efficient/usable way of handling all functions envisioned for this inputpad:
A- {Mouse movement, clicks, few basic windows keys (ie win, shift, ctrl, esc, alt, tab, cut/copy/paste,..)} SWITCH {Cursor movement, text typing, enter, space}
B- {Mouse movement, clicks, text input} SWITCH {Cursor movement, special keys; enables selecting/editing etc.}
C- other, please specify&think through; this is still a daunting (though important) part..
[quote="[Food for thought]"]
(probably) needed/wanted functions:
-mouse movement (inc LMB,RMB,MMB,LMBx2),
-multimedia keys (inc master vol+|-),
-selecting & cut/copy/pasting from within cursor layout,
-typing text,
-hitting shortcutkeycombo's {win+e, alt+(shift+)tab, ctrl+shift+esc(=ctrl+alt+del), F5, (shift+)page-up/page-down/home/end, ctrl+space, ctrl+arrow_keys,}
-a quicker/more efficient mouse movement method, perhaps through a 'shift' function; if that'd be programmed it could solve most other issues as well (the shift state, using it with the joystick to speed up mouse; or using it in textmode to gain access to special keys).

So if anyone knows from the top of their head an quick/easy/efficient way to program shift states (for the keypad itself, not for characters), that'd be amazing; otherwise i'll get around to it, but am atm a little daunted still: would probably easily triple the amount of code, and perhaps make it less of a quick start-use-close script..

Right, two more things i should soon start looking for;
-keycode for MiddleMouseButton (specially for WinRoll & GridMove), and,
-keycode for MenuKey (the one next to WinKey on keyboards, the fake RMB),
Again, if anyone reading this already knows, fantastic ;)
[/quote]
[/quote]

Finally- any feedback is absolutely welcome!
PS: Changelog has moved to inside the .js =D

[loose_Q_winamp v2_:] Anybody know how to add into Phil's Winamp V2.0 (05/28/'08) script the option to select 'All' when searching for an artist/song/album?
[size=9]{he mentioned in that thread he'd accidentally removed it and was gonna put it back in, though not in the versions i've found...}{and winamp v3, haven't tested that since i prefer winamp to stay offline, quicker as well}[/size]



InputPad.js.txt
 Description:
[v1 was 30-04-'09]
[v2 was 02-05-'09]
[v3 was 05-05-'09, 11:04]
[InputPad V.4: 05-05-'09, 15:36]
CHANGEs: goooood. ;)

Download
 Filename:  InputPad.js.txt
 Filesize:  16.23 KB
 Downloaded:  1723 Time(s)


black1x1.bmp.txt
 Description:
1 square pixel, black.
(rename from .BMP.TXT to .BMP)

Download
 Filename:  black1x1.bmp.txt
 Filesize:  66 Bytes
 Downloaded:  1435 Time(s)


InputPad.xml.txt
 Description:
InputPad v1 xml (29-04-2009, 22:20)
(rename from .XML.TXT to .XML)

Download
 Filename:  InputPad.xml.txt
 Filesize:  388 Bytes
 Downloaded:  1424 Time(s)



Last edited by bB on Tue May 05, 2009 3:41 pm; edited 15 times in total
Back to top
View user's profile Send private message
jae_63
Senior Member


Joined: 29 Mar 2006
Posts: 79
Location: Bethesda, MD

PostPosted: Thu Apr 30, 2009 6:11 pm    Post subject: Reply with quote

Looks cool; note that "ps" = "post script", so you mean "pps" = "post post script" etc.

-- The grammar/English usage police
Back to top
View user's profile Send private message
bB
Newbie


Joined: 23 Apr 2009
Posts: 13

PostPosted: Thu Apr 30, 2009 7:54 pm    Post subject: Reply with quote

true enough- though, shouldn't that be 'post scriptum'.. ;)

(cheers for noticing, i hadn't yet picked that up; now i know 'pps' vs 'pss')
Back to top
View user's profile Send private message
joeker
Junior Member


Joined: 31 Mar 2007
Posts: 58

PostPosted: Fri May 01, 2009 5:02 am    Post subject: Reply with quote

Nice one, thanks!

One problem here (xp sp3) -- the magnifier doesn't behave when it's killed, messing with the desktop.
My workaround:
[quote="modify code"]
if (helper.IsProcessRunning("magnify.exe")) {
findmagnifierandclose();
}
[/quote]

[quote="add"]
function findmagnifierandclose() {
var mw=0;
try {
mw = FindWindow( "", "Magnifier" );
} catch(e) { }
if( mw != 0 ) { //found window
ActivateWindow(mw);
SendVirtualKeystroke( 0x73, false, false, true, false ); //Send Alt+F4
}
else { //force it
WSShell.Run("TASKKILL /F /IM Magnify.exe",0);
}
}
[/quote]

p.s.:
If you change lines 30/217 to [quote="code"]widget3IPaM.image = resourcesPath+"\\black1x1.bmp";[/quote]
the file can remain in scriptdir.
Back to top
View user's profile Send private message
bB
Newbie


Joined: 23 Apr 2009
Posts: 13

PostPosted: Sat May 02, 2009 3:44 pm    Post subject: [see starting post for the updated beef] Reply with quote

cheers; i'll do that <logical> file location correction!
Weird about magnify though, on sp3 here too; no probs... (though it's a bit of a slow b* to start & kill each time you use the script)
Could it be your taskkill.exe ([i]mine:[/i] 5.1.2600.5512 (xpsp.080413-2105) & 76.288bytes) or perhaps a few obsolete services running (wild guess)? Dunno, seems weird it'd take an alt-f4 but no taskkill. How btw, rearrange desktop; icons?

Oh, start using it and you'll see a few more problems, trust me ;)
[quote="'w/ InputPad_script'"]: Sometimes on exit of writer-part will close magnify correctly, but stay inside the script (other widget: mouse-part).. don't really know what to do about that, perhaps a way (function) to kill both widgets upon exit of one of two; but haven't gotten around to that, just a li'll weird.[/quote]
[quote="'w/ Magnify.exe'"]: Is slow, 'specially annoying when working with mouse-part..[/quote]

Ah, joeker- just checking, resourcesPath doesn't need to be specified by script?
*edit* Yes indeed it needs to be.. so no go. :(*
*actually... what it needed was for the file to actually be in the resourcesdir :roll:
Back to top
View user's profile Send private message
joeker
Junior Member


Joined: 31 Mar 2007
Posts: 58

PostPosted: Sun May 03, 2009 8:55 am    Post subject: Reply with quote

[quote](..) resourcesPath doesn't need to be specified by script?[/quote]
Indeed, [i]resourcesPath[/i] (and [i]settingsPath[/i]) are script-specific 'environmental variables.' Took me long enough to stumble upon these .. so I thought I'd mention it :)

@Taskkill.
Problem was that -- when 'snapped-in' (not floating) -- magnify wouldn't give back the occupied space. I virtually lost that portion of my workspace until a manual run/close.

Just found another much better fix -> remove the force-switch (/F) and it apparently terminates the process gracefully (magnify is allowed to restore the previous state)!
[quote="code"]
if (helper.IsProcessRunning("magnify.exe")) { WSShell.Run("TASKKILL /IM Magnify.exe",0); };
[/quote]

[quote](..) you'll see a few more problems[/quote]
I'm already using your script frequently (serial couchpotato :) and I like the basic functionality. There's always room for improvement, of course.
Thanks again!

[quote](..) perhaps a way (function) to kill both widgets upon exit of one of two[/quote]
Not a big deal imo .. I'll let you know if I find something.
Back to top
View user's profile Send private message
bB
Newbie


Joined: 23 Apr 2009
Posts: 13

PostPosted: Mon May 04, 2009 9:08 pm    Post subject: Reply with quote

[quote] 'snapped-in'[/quote]
Sounds familiar (i think i know what it would look like) but hOw do you get it to snap in (to your desktop i guess)? *EDIT* Got it; drag to any side of the screen.
And will remove the /F switch in next version then i guess! (i actually added that in hopes of it dieing quicker ;) )

Oh, [quote](..) perhaps a way (function) to kill both widgets upon exit of one of two[/quote] in there i was referring to a possible solution i'm already aware of; i.e. a function that gets called upon exit of either script, that might check to see if the other widget is still there; to only then (if false) kill magnify.
OH! Or to just leave magnify running, but minimizing it on script_exit.
...but really haven't gotten around to implementing :)

(ps: startpost edited)
Back to top
View user's profile Send private message
bB
Newbie


Joined: 23 Apr 2009
Posts: 13

PostPosted: Thu Jul 09, 2009 3:26 pm    Post subject: so.. Reply with quote

My phone died, so i most probably will be moving on to different solutions, and that's why i haven't been editing this script; not that anyone noticed i guess ;)

either way, use/edit/share/enjoy.
-peace-
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group