textedit2.dll problem Thread last updated on 2003-02-15 22:54:34

Posted by member 5669 on 2003-02-14 19:18:41

i'm using textedit2.dll to save change states in a theme i'm making right now, and i can't get it to work the way it's supposed to.

an example:

i want to script the theme so that when i click an image, it moves the position of gandharva.dll.

*Shortcut "" -140 0 title-main.bmp .none .none #12 !execute [!textreplace "$ThemeDir$step.rc" "GandharvaY 198" "GandharvaY 140"]

my problem is that whenever i save the step.rc (after adding in this line) and recycle, the command does not work the way it should.

instead of replacing the line in the gandharva config as it should, it replaces the line that the !textreplace command is in. what i mean is that this:

*Shortcut "" -140 0 title-main.bmp .none .none #12 !execute [!textreplace "$ThemeDir$step.rc" "GandharvaY 198" "GandharvaY 140"]

gets replaced with this:

GandharvaY 140

does anyone have a clue why it does this?

Posted by member 182 on 2003-02-14 22:01:29 link

thing is, since that line has the search string in it, it gets changed too. try making sure the value you want to change is @ the start of a line, and put a ^ at the start of your textedit2 search string.

Posted by member 5669 on 2003-02-15 02:13:46 link

yea thanks psynapse, i got it now :D

now my next question: how do i make it so it will append text into a line of text without deleting everything after it?

for example:

"the dog ran outside"

to

"the dog ran fast outside"

Posted by member 5669 on 2003-02-15 02:47:22 link

basically, what i'm looking to do is edit the "H" flag on my shortcuts so that when i switch to "small" mode it hides one shortcut and shows another (and vise versa when i go to "big" mode).

i can't figure out how to do this without typing a buttload of text.

Posted by member 562 on 2003-02-15 04:06:33 link

shouldn't commands like "!ShortcutGroupHide 1" and "!ShortcutgroupShow 11" do the trick? And i guess gandharva will obide to a "!GandharvaMove newX newY" bang. no need for recycle...

Posted by member 884 on 2003-02-15 04:25:05 link

I think hes trying to save "Between" recycles the Users specified config...like changing ontheFly with !Bangs, but keeping them after a recycle...atleast that would be a cool thing to do.

Posted by member 562 on 2003-02-15 12:42:56 link

so, let mzscript determine which shortcutgroups to show or hide (and move modules if need be) at theme startup - on basis of variables set in script.rc during previous session (e.g. *script var Mode "small")

Posted by member 5669 on 2003-02-15 13:58:48 link

i was trying to do it without mzscript because i couldn't get the variables to work for me at all.

Posted by member 5669 on 2003-02-15 16:15:41 link

also, another problem: i can't figure out how to get unparsed double quotes to work. the documentation says that \" will give you double quotes, but it doesn't work. i'm stumped and i wish i could figure this out :(

Posted by member 5669 on 2003-02-15 22:54:34 link

thanks guys (you actually did kinda help believe it or not!) i finally figured it out.

instead of doing one big step.rc, i split it up into two separate configs (small.rc and main.rc) and now it works like a charm! w00t!