> the attached (unpolished) script can retrieve all the values in the
> ScriptDebug window,
>...
> It works perfectly when the ScriptDebug window
> is idle, but this simple scriplet will easily break the result:
Oops, forgot to attach the script, here it is, run as
[EMAIL PROTECTED](1) ;; or 0
all info dumped to (plain) debug window
requires miscplugin
watch out for folded lines below
if you get an 'invalid vector/map index for get' error, just press OK
;: @dbgInfo - fill static vector dbgInfo with ScriptDebug contents {{{2
;: if bExtended fetch all info, else just:
;: script fullpathname, breakpoints, scriptname, line#, line contents, and all _expression_ fields (not their
values)
;: values returned may include string "NOT_FOUND", test with if("" != value && 0 == index
(value,"NOT_FOUND"))
;: indexes are named dbgInfo_XXX see list below
@dbgInfo
args bExtended
local i
static dbgInfo
static dbgInfo_BreakAt
if("" == dbgInfo_BreakAt)do
static dbgInfo_Pathname=0 ;; a fullpathname isn't included in ScriptDebug dialog
static dbgInfo_BreakAt=6
static dbgInfo_ScriptName=7
static dbgInfo_Line=8
static dbgInfo_LineContent=9
static dbgInfo_Exp0=14 ;; all others by step 2 from here
static dbgInfo_Exp9=32 ;; to here
static dbgInfo_Val0=15 ;; all others by step 2 from here
static dbgInfo_Val9=33 ;; to here
endif
if(vec.exists(dbgInfo) )
dbgInfo = vec.destroy(dbgInfo)
dbgInfo = vec.create(40)
dbgInfo[dbgInfo_BreakAt] = miscplugin.get_windowtext("PowerPro Script
Debug",dbgInfo_BreakAt,"","win=all","sep=13")
dbgInfo[dbgInfo_ScriptName] = miscplugin.get_windowtext("PowerPro Script
Debug",dbgInfo_ScriptName,"","win=all","sep=13")
dbgInfo[dbgInfo_Line] = miscplugin.get_windowtext("PowerPro Script
Debug",dbgInfo_Line,"","win=all","sep=13")
dbgInfo[dbgInfo_LineContent] = miscplugin.get_windowtext("PowerPro Script
Debug",dbgInfo_LineContent,"","win=all","sep=13")
for(i=dbgInfo_Exp0;i<=dbgInfo_Exp9;i=i+2)
dbgInfo[i] = miscplugin.get_windowtext("PowerPro Script Debug",i,"","win=all","sep=13")
endfor
if(bExtended)do
for(i=dbgInfo_Val0;i<=dbgInfo_Val9;i=i+2)
dbgInfo[i] = miscplugin.get_windowtext("PowerPro Script Debug",i,"","win=all","sep=13")
endfor
endif
;i to fetch fullpathname evaluate temporary _expression_
;i (neutering all expressions to avoid side effects)
for(i=dbgInfo_Exp0;i<=dbgInfo_Exp9;i=i+2)
exec.scriptdebugfield((i-dbgInfo_Exp0)/2,"")
endfor
exec.scriptdebugfield(0,"scriptfolder")
; press Evaluate button
win.sendmessage(win.handle("PowerPro Script Debug"),0x111,10,0)
;wait.ready("PowerPro Script Debug")
local p = miscplugin.get_windowtext("PowerPro Script Debug",dbgInfo_Val0,"","win=all","sep=13")++??
\?++dbgInfo[dbgInfo_ScriptName]
; restore expressions
for(i=dbgInfo_Exp0;i<=dbgInfo_Exp9;i=i+2)
exec.scriptdebugfield((i-dbgInfo_Exp0)/2,dbgInfo[i])
endfor
if(file.validpath(p++".powerpro"))do
p=p++".powerpro"
elseif(file.validpath(p++".txt"))do
p=p++".txt"
endif
dbgInfo[dbgInfo_Pathname] = p
for(i=vec.length(dbgInfo)-1;i>=0;i=i-1)
win.debug(i,dbgInfo[i])
endfor
quit
; ----- end -----
Attention: PowerPro's Web site has moved: http://www.ppro.org
SPONSORED LINKS
| Computer monitoring software | Power pro | Computer and internet software |
| Free computer monitoring software |
YAHOO! GROUPS LINKS
- Visit your group "power-pro" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
