Mortscript applications repository   

Postby Fatboyfun » Wed Mar 06, 2013 7:50 am

Run("Windows\undrv.exe", "UIO1: 1000 ""Drivers\BuiltIn\NDISUIO"" Drivers\BuiltIn\ipv6hlp Drivers\BuiltIn\ZeroConfig Drivers\BuiltIn\Ethman")

You are double quoting here, and also the run command in mortscript can only have one argument.

I got round this in one of my projects by writing a wince shortcut (.lnk) and running it.
Fatboyfun offline


User avatar Ex Moderator



 
Joined: Mon May 17, 2010 5:34 pm
Posts: 5782
Has thanked: 2 times
Been thanked: 408 times

Postby oodathort » Wed Mar 06, 2013 8:04 am

Hi FBS can you point me to the project :)
oodathort offline


Junior Member



 
Joined: Sat Nov 05, 2011 1:29 pm
Posts: 26
Has thanked: 0 time
Been thanked: 1 time

Postby Fatboyfun » Wed Mar 06, 2013 8:16 am

It's not published anywhere, and I don't have access to the code right now, but check back later...
Fatboyfun offline


User avatar Ex Moderator



 
Joined: Mon May 17, 2010 5:34 pm
Posts: 5782
Has thanked: 2 times
Been thanked: 408 times

Postby oodathort » Wed Mar 06, 2013 7:00 pm

Hi FBS
any luck
oodathort offline


Junior Member



 
Joined: Sat Nov 05, 2011 1:29 pm
Posts: 26
Has thanked: 0 time
Been thanked: 1 time

Postby Fatboyfun » Wed Mar 06, 2013 8:28 pm

This is a snippet from an unpublished project of mine (The one in my signature)

I needed to run an application to respond to a message silently and with different text depending on the request, that's three arguments, but mortscript's run command will only allow one argument at a time.

I got round this by writing a windows ce/mobile shortcut which allows several arguments, then running it.

Note: Sender and Text are pre-defined variables.

Code: Select all
WriteFile (SystemPath("ScriptPath")\"Temp.lnk", "72#""\Program Files\vijay555\VJSMSSender.exe"" "&Sender&" -silent "&Text)
Run (SystemPath("ScriptPath")\"Temp.lnk")


The resulting lnk text file looks like this...

72#"\Program Files\vijay555\VJSMSSender.exe" 07XXXXXXXX8 -silent Text to be sent goes here

If these shortcuts never change you only need to create them once (Possibly manually in notepad?) and just run them as normal.
Currently sleeping...
Fatboyfun offline


User avatar Ex Moderator



 
Joined: Mon May 17, 2010 5:34 pm
Posts: 5782
Has thanked: 2 times
Been thanked: 408 times

Postby oodathort » Thu Mar 07, 2013 7:33 am

Hi FBS
thanks fot the code but I dont quite understand what it does in relation to me trying to load 2 drivers one after another can you explain more ?

Stu
oodathort offline


Junior Member



 
Joined: Sat Nov 05, 2011 1:29 pm
Posts: 26
Has thanked: 0 time
Been thanked: 1 time

Postby Fatboyfun » Thu Mar 07, 2013 8:01 am

Start from the beginning, explain to me what you are doing and where you got the code from?
Fatboyfun offline


User avatar Ex Moderator



 
Joined: Mon May 17, 2010 5:34 pm
Posts: 5782
Has thanked: 2 times
Been thanked: 408 times

Postby oodathort » Thu Mar 07, 2013 8:28 am

Hi FBS
First thanks for your time :)

I have a dynavin head unit thats been unlocked and a patch from petrut for wifi this works fine my dynavin head did not have TMC so I have spent the last month or so playing with a Royaltec TMC unit and a TTLto RS232 adapter to get primo to work with the TMC unit and now that works fine . However its one or the other I have been trying to load both drivers one after the other from boot with a time delay between so in other words with both devices pluged into a single usb slot the head detects unreconised usb loads the first driver then the head detects unreconised usb and loads second driver what would be nice would be to select second device with a button screen below is the origional code that loads the wifi driver if you insert the wifi dongle into the usb port

If(WndExists("Unidentified USB Device"))
WaitForActive ("Unidentified USB Device", 5)
SendKeys( "rt2870.dll" )
SendCR
Sleep(2000)
Run("Windows\undrv.exe", "UIO1: 1000 ""Drivers\BuiltIn\NDISUIO"" Drivers\BuiltIn\ipv6hlp Drivers\BuiltIn\ZeroConfig Drivers\BuiltIn\Ethman")
Else
Run("Windows\undrv.exe", "UIO1: 1000 ""Drivers\BuiltIn\NDISUIO"" Drivers\BuiltIn\ipv6hlp Drivers\BuiltIn\ZeroConfig Drivers\BuiltIn\Ethman")
Sleep(5000)
Run( "\StorageCard\Program Files\lockscreen\lockscreen.exe" )
EndIf
EndIf

so in short Im trying to hve both dongles installed but switch the second on when required if poss

hope this helps

Stu
oodathort offline


Junior Member



 
Joined: Sat Nov 05, 2011 1:29 pm
Posts: 26
Has thanked: 0 time
Been thanked: 1 time

Postby Fatboyfun » Thu Mar 07, 2013 9:22 am

Is this through a hub, and can you load both drivers at the same time?

If so it should be possible to do what you want?
Fatboyfun offline


User avatar Ex Moderator



 
Joined: Mon May 17, 2010 5:34 pm
Posts: 5782
Has thanked: 2 times
Been thanked: 408 times

Postby oodathort » Thu Mar 07, 2013 9:34 am

Hi FBS

yes a hub thats the issue how to do this or better still select when to load second driver reason for this I need TMC all time but only require wifi every now and then

Stu
oodathort offline


Junior Member



 
Joined: Sat Nov 05, 2011 1:29 pm
Posts: 26
Has thanked: 0 time
Been thanked: 1 time

Postby Fatboyfun » Thu Mar 07, 2013 9:23 pm

I don't know if a hub with two devices attached is supported under wince..?

Have you tried starting it all manually?
Currently sleeping...
Fatboyfun offline


User avatar Ex Moderator



 
Joined: Mon May 17, 2010 5:34 pm
Posts: 5782
Has thanked: 2 times
Been thanked: 408 times

Postby oodathort » Fri Mar 08, 2013 6:54 am

Hi FBS
yes if I put 1 device in with current set up it works fine if I then remove that usb device and install the other that works fine
oodathort offline


Junior Member



 
Joined: Sat Nov 05, 2011 1:29 pm
Posts: 26
Has thanked: 0 time
Been thanked: 1 time

Postby oodathort » Fri Mar 08, 2013 6:59 am

forgot to add thats why I think if a time delay can be put between the drivers loading it should work
oodathort offline


Junior Member



 
Joined: Sat Nov 05, 2011 1:29 pm
Posts: 26
Has thanked: 0 time
Been thanked: 1 time

Postby Fatboyfun » Fri Mar 08, 2013 11:22 am

Well the sleep command is a simple delay command, or you could use a while command, I still don't know if wince supports a hub, if it's just a case of unplugging one device for another occasionally then I'd load the tmc driver at startup and set up a button to load the wifi driver, unless it can be automated.
Fatboyfun offline


User avatar Ex Moderator



 
Joined: Mon May 17, 2010 5:34 pm
Posts: 5782
Has thanked: 2 times
Been thanked: 408 times

Postby oodathort » Fri Mar 08, 2013 11:35 am

Hi FBS
Thats it can you provide a code example for the button set up

Stu
oodathort offline


Junior Member



 
Joined: Sat Nov 05, 2011 1:29 pm
Posts: 26
Has thanked: 0 time
Been thanked: 1 time

PreviousNext

Return to Tools & Tutorials

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests