How to STOP script via USB remote? - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum  

How to STOP script via USB remote?

  • 37 Replies
  • 14553 Views
*

Offline reyalp

  • ******
  • 14121
Re: How to STOP script via USB remote?
« Reply #10 on: 26 / June / 2016, 16:10:31 »
Advertisements
I tried the modified script but I am getting an 'Ukn Stat' error. I just tried the old one and it does stop if I leave the switch on.
"Ukn stat" means CHDK tried to load the script as ubasic, not lua. Make sure the file really has a .lua extension (not .lua.txt or something like that)
Don't forget what the H stands for.

*

Offline Paco

  • **
  • 77
Re: How to STOP script via USB remote?
« Reply #11 on: 26 / June / 2016, 16:22:41 »
I am pretty sure I loaded the LUA script but the error is 'uBASIC: 1 Ukn Stmt.' I loaded the script from the bottom of the list where other LUA scripts are listed. The ones with the same name at the top of the list are together with the BAS scripts so I think that's right. The extension is cut off in my display.

How to STOP script via USB remote?
« Reply #12 on: 26 / June / 2016, 16:27:14 »
I am pretty sure I loaded the LUA script but the error is 'uBASIC: 1 Ukn Stmt.' I loaded the script from the bottom of the list where other LUA scripts are listed. The ones with the same name at the top of the list are together with the BAS scripts so I think that's right. The extension is cut off in my display.
It's a lua script.  If the file name does not have the extension .lua it's not going to work. The error message tells me that's what you have done somehow?


Edit.: The new script had the same name as the old one.  Did your browser rename it when it downloaded it?
« Last Edit: 26 / June / 2016, 16:30:23 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline Paco

  • **
  • 77
Re: How to STOP script via USB remote?
« Reply #13 on: 26 / June / 2016, 16:37:23 »
I'm pretty sure it is LUA because it is right above the old script which works. BTW I just tried the old script and left it running 10 min. and it does stop when I turn the switch on. The only thing is I  have turn it on and then off to get the script started. Why would that be?


How to STOP script via USB remote?
« Reply #14 on: 26 / June / 2016, 16:43:52 »
I'm pretty sure it is LUA because it is right above the old script which works. BTW I just tried the old script and left it running 10 min. and it does stop when I turn the switch on. The only thing is I  have turn it on and then off to get the script started. Why would that be?
Both scripts had the save file name when i posted then.  Silly me. If you see two scripts then the new one has been renamed.  As I said, if the file extension is not .lua it will not work.  It does not matter what order you see it in the file list. CHDK will try to run it as a uBASIC script.

You need to look at the complete filename in your computer's file browser!

EDIT : the switch behavior you see is as planned. The script needs to see the switch go on and off at each step in the process so that it does not just skip straight thorough.
« Last Edit: 26 / June / 2016, 16:58:49 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline Paco

  • **
  • 77
Re: How to STOP script via USB remote?
« Reply #15 on: 26 / June / 2016, 17:42:48 »
In the CHDK/SCRIPTS directory the two files are named usb_interval.lua and usb_interval (1).lua.

In the camera display, the extensions and part of the names are cut off. At the top of the page both files are labeled `_usb_interval~ and the different times distinguish them. They are directly below bas files and, when run, just start and stop, doing nothing.

At the bottom of the page, the files are named usb_interval (~ and usb_interval.l,again distinguished by the times. They are below lua files. These both run, the usb_interval file giving the uBasic error.

« Last Edit: 26 / June / 2016, 17:45:59 by Paco »

How to STOP script via USB remote?
« Reply #16 on: 26 / June / 2016, 17:57:21 »
In the CHDK/SCRIPTS directory the two files are named usb_interval.lua and usb_interval (1).lua.
As I suggested earlier, your browser renamed the newer version of the script when you downloaded it.   The new name confuses CHDK.  It might be simplest if i just posted it with a new file name but I'm using my mobile phone on an aircraft at the moment and that's hard to do.

How about you delete both files from your camera and from your PC? Start fresh and then download only the newest version of the script?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: How to STOP script via USB remote?
« Reply #17 on: 26 / June / 2016, 17:59:59 »
In the camera display, the extensions and part of the names are cut off. At the top of the page both files are labeled `_usb_interval~ and the different times distinguish them. They are directly below bas files and, when run, just start and stop, doing nothing.
To answer this part: you're obviously using a Mac. Files starting with dot and underscore are special files created by some part of the Mac OS. They are hidden originally, but show up in the CHDK file browser when using CHDK 1.4.x (and maybe earlier).
This issue has been corrected in CHDK 1.5, hidden files should no longer appear there, unless you enable a new option in CHDK menu.


Re: How to STOP script via USB remote?
« Reply #18 on: 26 / June / 2016, 19:06:53 »
As I seem to be unable to successfully describe to you why you are having problems with what your Mac has done to the script name,  here's the same (new) script with a different name.

Load this and ignore the previous version ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline Paco

  • **
  • 77
Re: How to STOP script via USB remote?
« Reply #19 on: 26 / June / 2016, 19:40:39 »
To answer this part: you're obviously using a Mac. Files starting with dot and underscore are special files created by some part of the Mac OS. They are hidden originally, but show up in the CHDK file browser when using CHDK 1.4.x (and maybe earlier).
This issue has been corrected in CHDK 1.5, hidden files should no longer appear there, unless you enable a new option in CHDK menu.


I checked and the SCRIPTS directory on the SD card have the ._ files, and they show up on the card for every file that's added. BUT I told you they don't do anything and I chose the other ones that are the lua files. I changed the name from usb_interval (1).lua to usb_interval_2.lua and now it works. So the spaces were the problem.


This second script requires an 'on/off' sequence to start and to stop, whereas the first version stops with an 'on'.


I will upgrade to 1.4 but not to the 'unstable' 1.5. Now that I know to avoid the ._ versions I'm fine.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal