- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: like select case in lua
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-26-2012 09:28 PM
I didn't realize you were using an excel sheet to read everything in. That then makes a lot more sense. Your Excel sheet is the UI in your case.
Re: like select case in lua
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2012 04:07 AM
.. i followed this thread .. it gets more interesting every day :-)
@josick:
you could do step 1 with ll.sCmd("ConvertFile",...), that is actually a Read function. (if you use .csv format and a lua-explode function it would be very easy to get the data into an array)
.. the "WriteFile" function is not working 100% yet - if the string is larger then 900 characters and/or contains some illegal characters (e.g. %) .. i am working on the next update now, trying to fix this issue and adding some more functions.
Re: like select case in lua
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2012 04:58 AM
In one of my partials exemples, you have this line (put in comment)
ll.sCmd("WriteFile", alphalist[xmax]..infoTime.."\n", pathfile..[[LuaTestFile.txt]], 1)If I can have a quick look on tray tip time for each key pressed appears, with WriteFile, these results are then stored in a file. For example:
s G5: 27 G1: 30 G6: 36 z G1: 124 G2: 129 e G1: 75 G2: 110 b G1: 75 G2: 100 b G1: 51 G2: 79 c G1: 58 G3: 66 b G1: 20 G2: 59 z G1: 134 G2: 141 b G1: 23 G2: 50 b G1: 7 G2: 7
But, sorry h0rse, I'm not tested yet ll.sCmd("ConvertFile",...)...
Re: like select case in lua
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2012 07:12 AM
.. yes i have seen this line, so i just wanted to inform you about these possible bugs.
but the way you write (1=appending) each line, you shouldnt have problems.
i dont fully understand your project (i cant get the picasa sites?),
and i cannot compete with you guys in Lua-Code ...
but whenever you have problems/questions/suggestions about ll.sCmd i will try to help!
Re: like select case in lua
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2012 11:40 AM
@ h0rse : "(i cant get the picasa sites?),"
It's ok now ? I supposed. Tanks !
https://picasaweb.google.com/josick.croyal/Lua#572
For example, used one element in the second row --> _bascule2
In my coding, a row (map) is a cluster.
I use :
clusterdefaut=1
And the name of active cluster is clustera.
With _bascule2, the active cluster become the 2 (clustera=2)
And at the end of each execution https://picasaweb.google.com/josick.croyal/Lua#572
you have :
clustera=clusterdefaut
Like that, after each action in a other cluster (not default), you come back in the default cluster (clusterdefaut).
Re: like select case in lua
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2012 05:28 PM
okay, i am getting there ..
my idea was simply to get your excel-tables into a lua-table without VB could be to use ll.sCmd("ConvertFile", somewhere .. "ExcelFile.csv") with something like this
gL.com.explode = function(div,str) -- credit: http://richard.warburton.it if (div=='') then return false end local pos,arr = 0,{} for st,sp in function() return string.find(str,div,pos,true) end do table.insert(arr,string.sub(str,pos,st-1)) pos = sp + 1 end table.insert(arr,string.sub(str,pos)) return arr end
since .csv is easy to read and explode .. by "\n" and ";"
...
csv or
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2012 09:44 PM
csv or read directly to the clipboard :
moi = ll.sCmd("ClipBoardGet")
OutputLogMessage(moi.."\n")But at this time, I have this result :
ll.Project Modules: sCmd - loaded successfully!!!
cannot open C:\Users\josick\Documents\G2\server3\__System\data
Re: csv or
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2012 11:45 PM
Only this way :
ll.sCmd("ClipBoardSet", "Hello")is ok !
Re: csv or
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-28-2012 04:32 AM - edited 03-28-2012 04:34 AM
hmmm .. your code works here ...
- is llpp=[[C:\Users\josick\Documents\G2\server3\]] the folder that contains ll.Server?
- maybe try with a single-word not containing any speical characters first?! (string-length and illegal chars may be a problem)
- the "__System\data\lua\" folder contains the .lua files read by the script. i suppose its not write-protected?!
- you can also check/modify the "__System\_Resources\lua" it contains the external Lua code, but i think the prob is somewhere else
- EDIT: are you running this in a poll?
do you copy the complete table of your excel sheet or just a single cell? i think "ConvertFile" would be the better solution if you copy a complete table.
Re: csv or
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-28-2012 08:29 PM
"- the "__System\data\lua\" folder contains the .lua files read by the script. i suppose its not write-protected?!"
not exist : In llProject_sCmd_b1000.rar the "__System\data\lua\" folder not exist
Obiously, same problem with
local desktop = ll.sCmd("GetDesktop") cannot open C:\Users\josick\Documents\G2\server3\__System\data
