Forums » Technology » Hardware & Software - PC » Anyone with TouchControl experience? Or Javascript? Active Topics You are not logged in. [Log In] [Register User]
Topic Options
Rate This Topic
Hop to:
#3566842 - 05/03/12 02:38 PM Anyone with TouchControl experience? Or Javascript?
- Ice Offline
Hotshot

Registered: 06/23/05
Posts: 7409
Loc: Philippines / North East UK
I am trying to design a switch panel to work with Falcon BMS and I am using TouchControl, the same one used for the iViper (BMS) or iPadPit (DCS). I am trying to get a toggle switch image to show a different image each time the toggle switch is activated, to show an up, mid, or down position of the switch. The instructions to do so are on this page here under "The Return String" but I cannot seem to make it work...

Any help appreciated.
_________________________
- Ice


Top
#3567141 - 05/04/12 06:52 AM Re: Anyone with TouchControl experience? Or Javascript? [Re: - Ice]
alphatoomega Offline
Junior Member

Registered: 01/07/11
Posts: 16
Hi Ice

Saw your post over in the touch control forums about coding button feedback scripts. Have you tried this thread change background image dynamicly

I posted some code there to update the button images, after however many times you push a button.

Quote:
In the ahk script area copy this script in

send, a
return, "1"


I just have the 'Send a' as an example so you can change this to any command you want.
Then check the feedback script box and place this script

var a=_feedback;
var b=_value;
var c=a+b;
if (c=='1'){return 'button^[@]plastic/greencircle_40x40.png[&]1';}
var c =parseInt(a);
var d=parseInt(b);
var e=c+d;
if (e=='1'){return 'button^[@]plastic/greencircle_40x40.png[&]1';}
if (e=='2'){return 'button^[@]plastic/redcircle_40x40.png[&]2';}
if(e=='3'){return 'button^[@]plastic/yellowcircle_40x40.png[&]0';}
else{return 'button^no';}




Also note to make sure your button pack is zipped properly with the zip format (not rar), are .png files and are zipped to a folder called the name of your button pack in the zip file.


Edited by alphatoomega (05/04/12 06:54 AM)

Top

#3567155 - 05/04/12 07:45 AM Re: Anyone with TouchControl experience? Or Javascript? [Re: - Ice]
- Ice Offline
Hotshot

Registered: 06/23/05
Posts: 7409
Loc: Philippines / North East UK
Sir, I would love to be able to speak with you. Do you have Skype or maybe we can meet in SimHQ TS3 server?
_________________________
- Ice

Top
#3567191 - 05/04/12 08:46 AM Re: Anyone with TouchControl experience? Or Javascript? [Re: - Ice]
- Ice Offline
Hotshot

Registered: 06/23/05
Posts: 7409
Loc: Philippines / North East UK
Well, tried that, it doesn't work.

It does send "a", but the image does not change. I tried the button to be a hotspot, or have an image itself, no joy.
_________________________
- Ice

Top
#3567205 - 05/04/12 09:10 AM Re: Anyone with TouchControl experience? Or Javascript? [Re: - Ice]
alphatoomega Offline
Junior Member

Registered: 01/07/11
Posts: 16
Are you testing the button in the touch server application on the computer or are you testing it on the ipad?

Top
#3567215 - 05/04/12 09:30 AM Re: Anyone with TouchControl experience? Or Javascript? [Re: - Ice]
- Ice Offline
Hotshot

Registered: 06/23/05
Posts: 7409
Loc: Philippines / North East UK
You can test it in the server? I test on the iPad. Doesn't work.

Check PM please sir.
_________________________
- Ice

Top
#3567277 - 05/04/12 10:40 AM Re: Anyone with TouchControl experience? Or Javascript? [Re: - Ice]
alphatoomega Offline
Junior Member

Registered: 01/07/11
Posts: 16
You need to set the button to use an image from the same button pack and you need to call the button, button.

Right click on button, select image, select new image, from drop down select plastic, and then pick an image.


Top
Topic Options
Rate This Topic
Hop to:

Moderator:  RacerGT 
 

Forum Use Agreement | Privacy Statement
Copyright 1997-2013, SimHQ Inc. All Rights Reserved.