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

[amibroker] Re: PROBLEMS WITH AMIBROKER 5.296 AND USE OF KEY STROKES


  • Date: Fri, 15 Jan 2010 19:48:14 -0000
  • From: "bistrader" <bistrader@xxxxxxxxx>
  • Subject: [amibroker] Re: PROBLEMS WITH AMIBROKER 5.296 AND USE OF KEY STROKES

PureBytes Links

Trading Reference Links

Found Mouseclick function.  Is there a better way to open and run AB 5.296 with AutoIt rather than the following example?  Plus, does anyone know a way to get WinWaitActive to work on the left 9 characters of "AmiBroker - [RUT-I - Russell 2000 Composite Index Daily]" which is "AmiBroker" as I am thinking that this would be better than sleep of 20 seconds.

; Run (open) AmiBroker
Run("C:\AmiBroker\broker.exe")

; Wait for AmiBroker to become active - it has "AmiBroker" in upper left window
;WinWaitActive("AmiBroker")
;WinWaitActive("AmiBroker - [RUT-I - Russell 2000 Composite Index Daily]")

; Sleep for 20 seconds to let be sure open
Sleep(20000)

$x = 500 ; x position
$y = 500 ; y position
MouseClick("left",$x,$y)
Sleep(2000)

; Change to TC2000 database - File menu -> Open, T, Enter
Send("!f")
Sleep(2000)
Send("D")
Sleep(2000)
Send("T")
Sleep(2000)
Send("{ENTER}")
Sleep(20000)

; Save AmiBroker
Send("!f")       ; ALT f
Sleep(3000)
Send("S")        ; S for Save

; Exit AmiBroker
Sleep(2000)
Send("!f")       ; ALT f
Sleep(2000)
Send("X")        ; X for Exit
; Done



--- In amibroker@xxxxxxxxxxxxxxx, "bistrader" <bistrader@xxx> wrote:
>
> I have been using AB 5.2 and recently installed 5.296.  Twice to make sure as I was having the following problems.
> 
> I can not AB 5.296 to respond to key strokes!!
> 
> AB 5.296 is NOT response to key strokes and this causes the problem.  Here is what I do.
> 1. Click on the AB icon to open AB and it opens.
> 2. Hold down the function key and hit F for File or anything else and AB does not respond.  Notice that most upper left corner of screen with "AmiBroker - [RUT-I - Russell 2000 Composite Index Daily]" in it is light Blue.
> 3. Click on center of screen and notice that upper left corner of screen with "AmiBroker - [RUT-I - Russell 2000 Composite Index Daily]" in it turns to Dark Blue.  Now, AB responds to key strokes like Function Key with F for File.
> 
> I need to figure out how to work around this problem as I use AutoIt a lot to run AB.  None of my AutoIt programs key strokes will work in AB 5.296 (they did in 5.20, my last version on my PC) just like they do not work as explained above.  Here is a simple example of an AutoIt.
> 
> I can not get AutoIt to work with AB 5.296 give that AB 5.296 will NOT respond to key strokes UNTIL one clicks on the center of the screen after AB opens.
> 
> Run("C:\AmiBroker\broker.exe")
> 
> ; NEXT LINE DOES NOT WORK ANYMORE
> ;WinWaitActive("AmiBroker")
> ; NEITHER DOES NEXT LINE
> ;WinWaitActive("AmiBroker - [RUT-I - Russell 2000 Composite Index Daily]")
> 
> ; Sleep for 20 seconds to let be sure open
> Sleep(20000)
> 
> ; Change to TC2000 database - File menu -> Open, T, Enter
> Send("!f")
> Sleep(2000)
> Send("D")
> Sleep(2000)
> Send("T")
> Sleep(2000)
> Send("{ENTER}")
> Sleep(30000)
> 
> ; Save AmiBroker
> Send("!f")       ; ALT f
> Sleep(3000)
> Send("S")        ; S for Save
> 
> ; Exit AmiBroker
> Sleep(2000)
> Send("!f")       ; ALT f
> Sleep(2000)
> Send("X")        ; X for Exit
> 
> ; DONE
> 
> AmiBroker opens with the code above BUT AmiBroker does NOT respond to ANY of the key strokes.  Help appreciated.
> 
> ...
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/