[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Automatic Execution of Explorations



PureBytes Links

Trading Reference Links








<span
style='font-size:10.0pt;font-family:Arial;color:navy'>Taylan<font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>,

<span style='font-size:
10.0pt;font-family:Arial;color:navy'> 

<span style='font-size:
10.0pt;font-family:Arial;color:navy'>I am new to VB and I tried your code. The
VB told me that &#8220;function not defined&#8221; on FindWindow.
How to solve this problem?

<span style='font-size:
10.0pt;font-family:Arial;color:navy'> 

<span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks,

<span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sherwood

<span style='font-size:
10.0pt;font-family:Arial;color:navy'> 

<span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----
From:
owner-metastock@xxxxxxxxxxxxx [mailto:owner-metastock@xxxxxxxxxxxxx] <span
style='font-weight:bold'>On Behalf Of Taylan Sekerci
Sent: Friday, March 15, 2002 2:36
AM
To: metastock@xxxxxxxxxxxxx
Subject: Re: Automatic Execution
of Explorations

<span
style='font-size:12.0pt'> 



<span
style='font-size:10.0pt;font-family:"Comic Sans MS"'>Yes I do it for, running
many system tests at once.  A bit  experimental but I have more
than 100 system test (takes about 40 minutes with 550 Mhz machine ), and I run
them every night. I just cut, a small part of my Visual Basic
automation program, to give you an idea. Following codes runs MS and sets the
loading options number of days to 301. As you see this done mainly
mimicing key strokes. 





<span
style='font-size:10.0pt;font-family:"Comic Sans MS"'>regards,





<span
style='font-size:12.0pt'> 





<font size=2 color=navy
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:navy'>sub small_part()





<font size=2 color=purple
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:purple'>MetaStockPath = "C:\Program
Files\METASTOCK7\MetaStock"     
If Right(MetaStockPath, 1) <> "\" Then MetaStockPath =
MetaStockPath & "\"  ' make sure a backslash is at the end
of the path
MetaStockRun = MetaStockPath & "MSWIN.EXE"
MetaStockRun = Shell(MetaStockRun, vbNormalFocus)

Do
    DoEvents
    ReportReady = FindWindow("MetaStockMainWnd",
"MetaStock Professional")
Loop Until ReportReady <> 0
Call wait(0.3)
SendKeys "^o", True
Do
    DoEvents
    ReportReady = FindWindow("#32770",
"Open")
Loop Until ReportReady <> 0
Call bekle(0.3)
'--------------------LOAD OPTIONS DAN YUKLENECEK GUN SAYISI GIRISI-------------
If gunyukle = 301 Then
    SendKeys "%p", True
    SendKeys "l", True
    Do
        DoEvents
        ReportReady =
FindWindow("#32770", "Load Options")
    Loop Until ReportReady <> 0
    Call bekle(0.2)
    SendKeys "301", True
Else: End If





<font size=2 color=navy
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:navy'>end sub()





<font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>.





<font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>----- Original Message ----- 



<font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>From: "Nicholas Kormanik" <<a
href="mailto:nkormanik@xxxxxxxxx";><span
style='font-size:10.0pt;font-family:"Comic Sans MS";color:teal'>nkormanik@xxxxxxxxx<font
size=2 color=teal face="Comic Sans MS"><span style='font-size:10.0pt;
font-family:"Comic Sans MS";color:teal'>>





<font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>To: <<font
size=2 color=teal face="Comic Sans MS"><span style='font-size:10.0pt;
font-family:"Comic Sans MS";color:teal'>metastock@xxxxxxxxxxxxx<font
size=2 color=teal face="Comic Sans MS"><span style='font-size:10.0pt;
font-family:"Comic Sans MS";color:teal'>>





<font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>Sent: Thursday, March 14, 2002 6:40 PM





<font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>Subject: Automatic Execution of Explorations







<span
style='font-size:12.0pt'> 



<font size=2 color=teal
face="Comic Sans MS"><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:teal'>| 
| Folks,
| 
| I'd like to be able to set up a desktop 'macro/script/batch language'
| that opens MetaStock (7.2), and atomically runs a set of sequential
| explorations.
| 
| Do any of you now do that successfully?  If so, how?
| 
| Thanks,
| Nicholas
| 
| 
| 
| 
| 
|