bharatk8 Posted December 19, 2008 Posted December 19, 2008 Hi I reproduce script for auto refreshing Metastock charting software.Please suggest correction as it is not working. AutoItSetOption("WinTitleMatchMode", 1) WinWaitActive("MetaStock Professional") For $i = 10 to 1 Step -1 sleep(10000) Send("!fgN") Next Pl. help
Skruge Posted December 19, 2008 Posted December 19, 2008 Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?We're going to need more info.Have you tried WinMenuSelectItem? If the app supports it, it would be more reliable than Send. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
bharatk8 Posted January 3, 2009 Author Posted January 3, 2009 Hii need start/stop control with any key stroke or mouse click without limit of 10Pl. suggest changes.Bharat.We're going to need more info.Have you tried WinMenuSelectItem? If the app supports it, it would be more reliable than Send.
Flam Posted January 3, 2009 Posted January 3, 2009 (edited) I'm new but here's an attempt to help: HotKeySet("{F1}", "_Start") HotKeySet("{F2}", "_Stop") HotKeySet("{F3}", "_Close") $pause = 0 ;##Main##; TrayTip("Status","ON; F1 to start.", 2) While 1 Sleep(1000) WEnd ;##Functions##; Func _Start() While 1 ; DO STUFF HERE WEnd EndFunc Func _Stop() $Pause = NOT $Pause TrayTip("Status","Script is paused.",1) While $Pause Sleep(1000) WEnd EndFunc Func _Close() TrayTip("Status","OFF",3) Exit Endfunc And about the limit of 10... "For $i = 10 to 1 Step -1" Change your for loop to a while loop or something. Not sure what you're trying to do exactly but this was my best guess. Edited January 3, 2009 by Flam
apselvamdp Posted March 30, 2010 Posted March 30, 2010 Hi, I want to refresh all the opened charts in metastock.. whats the command to write in "send( )"
pyromus Posted March 10, 2012 Posted March 10, 2012 $dongu = 7200; $sure = 5 Local $cevap1 = InputBox("MetaStock Auto Refresh", "Kaç Periyod Dönsün ?", $dongu); Local $cevap2 = InputBox("MetaStock Auto Refresh", "Kaç Saniyede bir yenilensin ?", $sure); if ($cevap1 == "" AND $cevap2 == "") Then MsgBox(0, "", "Tüm alanları doldurmak zorundasınız. Program Sonlandırıldı") Exit Else MsgBox(1,"MetaStock Auto Refresh",$cevap2 & " saniyede bir yenilemek üzere çalışmaya başladı...",2); For $i = $cevap1 To 1 Step -1 WinWaitActive("[CLASS:MetaStockMainWnd]", "") WinMenuSelectItem("[CLASS:MetaStockMainWnd]", "", "&View", "&Refresh Data" ) Sleep($cevap2*1000); Next MsgBox(0, "MetaStock Auto Refresh", "Program Sonlandırıldı"); Exit EndIf;
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now