PrestwoodBoards: www.PrestwoodBoards.com

www.prestwoodboards.com

Search multiple Scripts

Search multiple Scripts in ObjectPAL topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: multiple   Scripts   Search multiple   Search multiple Scripts  
davidc
Kansas City, KS

Howdy,

Is there a way to search for something (a variable name, for example) across multiple scripts (and each section of those scripts, like run, var, proc, etc.)?

In the ideal world, I'd like the output to be something like:

   script1.ssl   proc   1732   the line of code with the search phrase

I suppose I might have to write my own script to do it - but was hoping for something easier.

(My big project has code split across several scripts because of the size limitations built-in to Paradox.)

Thanks,

David

Peace,
David Cheney

About davidc -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #17083, 3 replies
Thread Started 4/29/2018 11:44:25 PM
View Counter=782
Last Reply Posted 5/26/2018 10:33:36 PM)
Location=Kansas City, KS  
Joined=3/8/2002   MB Posts=44  
Moderator
Steven.G
Myrtle Beach, SC USA

enumsource will parse all the code of forms and libraries into memo fields, but it won't do scripts

Steven Green
Senior Software Engineer
Paradox Support Specialist DOS/WIN

Prestwood IT Solutions
8421 Auburn Blvd, Suite 256, Citrus Heights, CA 95610
Office: 916-726-5675 | Fax: 916-726-5676 | http://www.prestwood.com
About Steven.G -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #17084 (Level 2) and Parent is 17083
Reply Posted 4/30/2018 4:46:59 AM
Location=Myrtle Beach, SC USA 
Joined=9/23/2016   MB Posts=366  
rum
Frankfort, KY USA

Hey David,   I dont know if you found a solution to your issue.  Let me tell you how I do that.

As  Steven suggested, I use enumsourcetofile,  (and it does work on script files).   For each object I script i create a .src file.

For instance if I compile   test.ssl,  I use enumsourcetofile to send the script to test.ssl.src

All of the src files are stored in the same folder.

When I need to search for something, I open Notepad++  and use the "Find in Files" function and I filter on the .SRC files

Hope this helps.

About rum -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #17141 (Level 3) and Parent is 17083
Reply Posted 5/24/2018 12:29:25 PM
Location=Frankfort, KY USA 
Joined=6/12/2017   MB Posts=115  
Most Recent Post
davidc
Kansas City, KS

Great idea rum - here is how I implemented it (works great!) I added the true/false output just to see what it would be - all show True. (The documentation did not say what true/false meant in the context.)

;|BeginMethod|#Script1|Var|
Var
   dbgout TextStream
endVar

;|EndMethod|#Script1|Var|
;|BeginMethod|#Script1|run|
method run(var eventInfo Event)
   dbgout.create("dump_src.txt")

   Script2Text("build")
   Script2Text("over")
   Script2Text("web_b")
   Script2Text("web_e")
   Script2Text("web_d")
   Script2Text("web_g")
   Script2Text("web_r")
   Script2Text("dump_src")

   dbgout.close()
endMethod

;|EndMethod|#Script1|run|
;|BeginMethod|#Script1|proc|
Proc Script2Text(ScriptTitle String)
var
   theScript Script
endVar

if theScript.load(ScriptTitle) then
   if theScript.enumSourceToFile(ScriptTitle+".src") then
      dbgMsg(ScriptTitle+": True")
   else
      dbgMsg(ScriptTitle+": False")
   endif
else
   dbgMsg(ScriptTitle+": LoadFailed")
endif
endProc

Proc dbgMsg(theMessage String)
   dbgout.writeline(theMessage)
endProc

;|EndMethod|#Script1|proc|

Peace,
David Cheney

About davidc -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #17144 (Level 4) and Parent is 17083
Reply Posted 5/26/2018 10:28:57 PM
Location=Kansas City, KS  
Joined=3/8/2002   MB Posts=44  
www.prestwoodboards.com
Copyright (C) Prestwood IT Solutions.
All Rights Reserved.
Printed 4/8/2020