|
Joined: Feb 2005
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2005
Posts: 21 |
0 +fs 0 0 0 eminem - Stan.mp3 +fs 0 0 0 6.91 MB +fs 0 0 0 160 Kbs +fs 0 0 0 1 +fs 0 0 0 FSrv[Radicalas] +fs 6 0 0
=============== i want to change +fs 0 0 0 1 to +fs 0 0 0 2 how to do this?
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
$puttok(+fs 0 0 0 1,2,5,32)
-Andy
|
|
|
|
Joined: Feb 2005
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2005
Posts: 21 |
$puttok($gettok(0 +fs 0 0 0 eminem - Stan.mp3 +fs 0 0 0 6.91 MB +fs 0 0 0 160 Kbs +fs 0 0 0 1 +fs 0 0 0 FSrv[Radicalas] +fs 6 0 0,4,9),2,5,32)
what's wrong?
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
You want to return the 4th token in the text $gettok(...,4,9)? There is only 1 token matching C (9).
Check it out for yourself dude:
//echo -a $numtok(0 +fs 0 0 0 eminem - Stan.mp3 +fs 0 0 0 6.91 MB +fs 0 0 0 160 Kbs +fs 0 0 0 1 +fs 0 0 0 FSrv[Radicalas] +fs 6 0 0,9)
-Andy
|
|
|
|
Joined: Feb 2005
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2005
Posts: 21 |
var %tmp.dccse.id = $calc($gettok($remove($gettok($did(e8,1,%cd),4,9),0),2,32) + 1) $puttok($did(e8,1,%cd),%tmp.dccse.id,4,9) ============= returns: 0 Unknown command $did(e8,1,%cd) is for example 0 + 0 0 0 foje - lauzai.mp3 + 0 0 0 3.91 MB + 0 0 0 128 Kbs + 0 0 0 1 + 0 0 0 FSrv[Leonard] + 15 0 0
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
You have to specify the variable that you're putting the token into, even if it's the same variable that you're searching.
I've barely started working with dialogs, so I recognize $did as something to do with dialogs.
Since you are working with a dialog, I'm not going to try to code a repair for you, but will hope that someone more familiar with dialogs will help
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Yep dialogs indeed.
$did(e8,1,%cd)
e8 would be the dialog name itself. 1 would be the ID of the control. %cd would be the selected line.
-Andy
|
|
|
|
Joined: Feb 2005
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2005
Posts: 21 |
alias chdupli { var %cd = 2 while (%cd <= $did(e8,1).lines) { if (%tmp.dccse.size isin $gettok($did(e8,1,%cd),2,9)) { var %tmp.dccse.id = $calc($gettok($remove($gettok($did(e8,1,%cd),4,9),0),2,32) + 1) var %tmp.dccse.tok = $did(e8,1,%cd) $puttok(%tmp.dccse.tok,%tmp.dccse.id,4,9) return $true } inc %cd } return $false }
the same problem..
|
|
|
|
Joined: Feb 2005
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Feb 2005
Posts: 21 |
|
|
|
|
|