When you use ‘GoTo’ in a file? Is there a way to go back?
Not a Script but in the GUI as you look at a file.
Hi Jeff
The UI currently doesn’t have a way to return to the previous position after using GoTo. We are planning on adding this and we’ll try to let you know when it becomes available, probably in the next version or two. You can use bookmarks (Ctrl+F2 and F2) to jump back but that’s not as easy as having a goto previous command. Cheers!
Graeme
SweetScape Software
Worked with the Bookmarks and it was good enough to figure things out some what.
Thanks.
Next question on this subject.
Is Goto scriptable? Say I read a value can I have a script Goto that in the file. Read a value then Goback?
Yes, Goto is scriptable and you can use the functions GetCursorPos and SetCursorPos to move to a different location. For example:
int64 oldpos = GetCursorPos();
SetCursorPos( mypos ); // jump to a new position
SetCursorPos( oldpos ); // return to the old position
If you want to get more complicated and have multiple scripts that save and restore the current position then you would have to use some different techniques but this should work for a simple script. Cheers!
Graeme
SweetScape Software