bharatk8 Posted December 19, 2008 Share 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 Link to comment Share on other sites More sharing options...
Skruge Posted December 19, 2008 Share 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] Link to comment Share on other sites More sharing options...
bharatk8 Posted January 3, 2009 Author Share 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. Link to comment Share on other sites More sharing options...
Flam Posted January 3, 2009 Share 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 Link to comment Share on other sites More sharing options...
apselvamdp Posted March 30, 2010 Share Posted March 30, 2010 Hi, I want to refresh all the opened charts in metastock.. whats the command to write in "send( )" Link to comment Share on other sites More sharing options...
pyromus Posted March 10, 2012 Share 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; Link to comment Share on other sites More sharing options...
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