Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird str manipulation of trigger info
#1
Sorry if this has already been addressed, but I couldn't find anything about it.
I was using this function:

Function Function3
Trigger $f 0xC48 "C:\Users\Nubbers\AppData\Roaming\Mozilla\Firefox\Profiles\ssho80ot.default"     Help - how to add the trigger to the macro
Code:
Copy      Help
function event $name [$newname]
;event: 1 added, 2 removed, 4 renamed, 8 modified
str s=name
out s
out s.trim("C:\Users\Nubbers\AppData\Roaming\Mozilla\Firefox\Profiles\ssho80ot.default\")

One event gave me this output, which is correct:
C:\Users\Nubbers\AppData\Roaming\Mozilla\Firefox\Profiles\ssho80ot.default\cookies.sqlite-journal
cookies.sqlite-j

But another event gave me this output:
C:\Users\Nubbers\AppData\Roaming\Mozilla\Firefox\Profiles\ssho80ot.default\sessionstore-1.js
-1.j

Why?
#2
trim removes not exact string. It removes all characters that are in the string. Instead use getfilename, or get.
#3
Oh. Sorry for the dumb question.
Thanks!


Forum Jump:


Users browsing this thread: 1 Guest(s)