I.T. Discussion Community!
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

September Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardObjectPAL Topic   Print This     

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

 Posted 17 months ago (Thread Starter)
Comment Quote
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=695
Last Reply Posted 5/26/2018 10:33:36 PM)
Location=Kansas City, KS  
Joined=17 years ago   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
 Posted 17 months ago
Comment Quote
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=36 months ago   MB Posts=303  
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.

 Posted 16 months ago
Comment Quote
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=27 months ago   MB Posts=88  
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

 Posted 16 months ago (Thread Starter)
Comment Quote
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=17 years ago   MB Posts=44  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1221A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #17083 Counter
695
Since 4/29/2018

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech