Page 2 of 2

Re: Resizing script editor variable pallets

Posted: Fri May 26, 2023 7:11 pm
by mcelvain
I really enjoy reading this conversation among folks who know what they’re talking about !

Also enjoy looking under the hood in products you’ve authored.

All I know is that you’ll eventually age, as I have; needing bigger text sizes to read your previous work.

And nothing is more pressing than following the value of a variable through successive lines of code.

Maybe there’s a way to RevSpeak the value of a given variable with mouseloc in hotspot or something.

Re: Resizing script editor variable pallets

Posted: Fri May 26, 2023 7:34 pm
by FourthWorld
mcelvain wrote:
Fri May 26, 2023 7:11 pm
All I know is that you’ll eventually age, as I have; needing bigger text sizes to read your previous work.
Someone please tell that to the 20-somethings running Google's Maps team. ;)

Re: Resizing script editor variable pallets

Posted: Sun May 28, 2023 7:10 am
by mwieder
LOL.
I do want to say, though, that PowerDebug has the option to change the text font and size for both the variables display and the script view.

Re: Resizing script editor variable pallets

Posted: Mon May 29, 2023 1:51 am
by mcelvain
Since my temporary workaround to make debugger variables easier to see is to write them to a field or table on my left monitor with BIG text, and since a script can store itself in a variable, I can do this if I know which line of script is being read; both globals and locals can be distilled from the handler within the script I'm calling.

Is there a command that returns the number of the script line currently being executed ?

Re: Resizing script editor variable pallets

Posted: Mon May 29, 2023 2:24 am
by mwieder
Not a command, but if you catch the trace or traceBreak messages in a frontscript you get the proper arguments.

Code: Select all

on trace pHandlerName, pLineNumber, pDepth
on traceBreak pHandlerName, pLineNumber, pDepth

Re: Resizing script editor variable pallets

Posted: Mon May 29, 2023 4:40 am
by jacque
I think you said you were on a Mac. Cmd-Opt-+ (plus) zooms the screen, and Cmd-Opt-- (minus) reduces it. That might be easier than moving text around.

Re: Resizing script editor variable pallets

Posted: Mon May 29, 2023 8:39 am
by mcelvain
Thank-you for the suggestion to try your trace code in a frontscript, Mweider.

I will do that.

Jacque, I constantly use Cmd-Opt-(+/-).

Constantly.

Unfortunately, my hand joint bursae are taking their cues from my retinal membranes.

In fact, the reason I’m firing off questions is that I plan to write iPhone personal aps that render the device into a much-needed assistant.

Siri and Alexa aps are way too general, and their information collecting:dispensing ratio seems lopsided.

Not sure how A.I. will decide how to self-define long-term.

Re: Resizing script editor variable pallets

Posted: Mon May 29, 2023 6:10 pm
by mwieder
Here's the tl;dr of how I go from debugger to script editor. ymmv.

Code: Select all

/**
* editScriptAt
*
* pSelection : chunk - "char start to end of line n"
* pObject : name of object to be edited
*/
constant kIDEScriptEditor = "revNewScriptEditor 1"
private command editScriptAt pSelection, pObject
   local tChunk
   local tScriptEditor
   
   lock screen
   put kIDEScriptEditor into tScriptEditor
   
   try
      if pObject is not empty then
         edit the script of pObject
         put word 2 of pSelection,word 4 of pSelection into tChunk
         send "goLine" && word -1 of pSelection, "position", tChunk to group "Editor" of stack tScriptEditor in 10 milliseconds
      end if
   catch tJunk
      answer tJunk
      set the traceabort to true
   end try
   unlock screen
end editScriptAt

Re: Resizing script editor variable pallets

Posted: Fri Jun 02, 2023 7:31 am
by mcelvain
Very interesting code; can’t wait to try it.

Reading it makes sense.

Thank-you sir !

Since a re-install lies awaiting for my previous mutilation of mb, doing same to script editor is not fatal.

I’d still like to look under the hood of some of these toolkit stacks.