How to execute script code line by line? 
Author Message
 How to execute script code line by line?

How can I get notice of the actually executed script line using MS script
control in a VB6 host application? I want to list the script code and
highlight the actually executed script line.


Sat, 11 Feb 2012 20:08:25 GMT  
 How to execute script code line by line?

Quote:
> How can I get notice of the actually executed script line using MS script
> control in a VB6 host application? I want to list the script code and
> highlight the actually executed script line.

So to be sure it sounds like you want the de{*filter*} to step through
your VBScript that is in an external file?

I don't think you can do this because the code is not exposed to the
de{*filter*}.

I am fairly certain though that you could open the script as text and
read it line by line, doing whatever graphical presentation or pre-
processing that you want, and then passing the line of text to the
MSscripting object to be executed. Though this is not very elegant and
would require a lot more coding I think it may be the only way without
the help of some kind of web browser object to step line by line
through a script.

Hope that helps.



Sun, 12 Feb 2012 19:48:55 GMT  
 How to execute script code line by line?

Quote:
> How can I get notice of the actually executed script line using MS script
> control in a VB6 host application? I want to list the script code and
> highlight the actually executed script line.

I haven't used the ScriptControl, but one way is to execute an alternative
script with every other line has a statement that breaks, such as the
Err.Raise. Example:

Before:

i = 0
i = i + 1

After:

i = 0
Err.Raise 1000000
i = i + 1
Err.Raise 1000000

I am not sure if this fires the "Error" event, or how it affect "On Error"
statements.



Mon, 13 Feb 2012 00:16:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP - Manually Place Long Lines of Code over Several Lines in Code Window

2. VBA script - execute from command line

3. line after line in a script

4. Executing a command line using code

5. Shell - Wait for shelled app to load then execute next line of code

6. Continuing a line of code on the next line

7. 1 line of code on 2 lines

8. Executing command line function from VBA (Excel)

9. AutoNew fails to execute from command line

10. Executing command-line EXE and retrieving output

11. How do you execute a Command line App inside a VB program

12. Executing 16Bit Command Line App with VB6

 

 
Powered by phpBB® Forum Software