Hello,

Single-pane chart refresh is available via RequestTimedRefresh.
It allows to refresh as often as every second.
It refreshes periodically. Refreshing "immediately" would inevitably lead to infinite loop (refresh-execution-refresh-execution-.... repeated thousands times per second) and locking up CPU (so called busy wait loop). It was possible in the past (5 years ago or so) using RefreshAll and I got dozens of "bug reports" when users simply created codes that triggered such infinite refresh loop locking up all computer resources and not being able to stop this. Since then RefreshAll also includes protection against refreshing too often precisely to prevent users from shooting themselves in the foot by writing incorrect code.

GUI should rather be created using Parameters window.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-06-18 22:28, Herman wrote:


Thank you Keith but this refresh must be afl invoked. I am thinking of "mouse-click" because this invokes an immediate pane-only refresh, I can think of no other function that does that. The idea is to be able to keep refreshing the chart at, say, 10xSec during mouse input. This would allow creating very nice interactive GUIs.

I think Keith's idea might work if we place the AlertIf() at the end of the code....

herman



        


Herman --
Have you considered using Auto Hotkey. It can produce mouse clicks and has some timing control and looping.
I have never used it myself.  But I know others on this forum have.
-- Keith

On 6/18/2010 14:23, Herman wrote:

Thank you for your reply Chris,

If we had an afl-controlled chart refresh we could create much more "responsive" GUIs. This is a missing function in the gfx library. Right now gfx functions, like dragging items, using a slider, dropping down menus, adjusting params, etc. are all "hesitant" because they have to wait for the next refresh to show the new graphics. I have too many parameters and functions to use the AB Param window, its just too big. RefreshAll() is too slow because it refreshes everything; I just want to refresh the selected pane.

I am not sure the AlertIf() would work because it is probably sampled at the next refresh and the delay would still be there. If it is easy for you to create an .exe I am willing to try it.

I am not entirely sure how to solve this, perhaps i am just programming it the wrong way... or wanting to do too much.

Thanks for the idea Chris,

herman





*> Herman,

> I can think of this, possibly, as a solution:

> (a) Use alertif to run a .exe that clicks the mouse. You can create a .exe > that clicks the mouse using something like vTask Studio. If you don't have
> it, I can create that .exe and email it to you

> May I ask you a question? Are you trying to get refreshes more frequently
> than executed ticks so that you can act on book changes before the tick?
> I've pondered how to do this in amibroker for some time, as by design, the
> screen refreshes upon tick execution (or requested time refresh of each 1
> second).  Seems to me that there might be one other way of doing it, and
> that is by:

> (b) running js that draws upon Amibroker AA (via OLE automation) every so
> often.  I haven't tried this at very frequent refresh interverals (eg < 1
> sec)

> Best,

> Chris

> ----- Original Message -----
> From: "Herman" <psy...@magma. <mailto:[email protected]>ca <mailto:[email protected]>> > To: "AmiBroker User Group" <amibro...@yahoogrou <mailto:[email protected]>ps.com <mailto:[email protected]>>
> Sent: Friday, June 18, 2010 2:12 AM
> Subject: [amibroker] Simulating a mouseclick from afl


>> Hello,

>> I  often  have  a  need  to  refresh  the selected chart from afl, for
>> example to create responsive GUIs.

>> I  have  seen code to simulate key-strokes, would anyone know if it is
>> possible to simulate a Mouse-click from afl?

>> Many thanks for any help you can give,

>> Herman





>> ------------------------------------

>> **** 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.amibroke <http://www.amibroker.com/feedback/>r.com/feedback/ <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.amibroke <http://www.amibroker.com/devlog/>r.com/devlog/ <http://www.amibroker.com/devlog/>

>> Yahoo! Groups Links







> ------------------------------------

> **** 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.amibroke <http://www.amibroker.com/feedback/>r.com/feedback/ <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.amibroke <http://www.amibroker.com/devlog/>r.com/devlog/ <http://www.amibroker.com/devlog/>

> Yahoo! Groups Links

<http://groups.yahoo.com/group/amibroker/>

<http://groups.yahoo.com/group/amibroker/join>group/amibroker/ <http://groups.yahoo.com/group/amibroker/join>join <http://groups.yahoo.com/group/amibroker/join>
>     (Yahoo! ID required)

<mailto:[email protected]>com <mailto:[email protected]> > amibroker-fullfeatu <mailto:[email protected]>r...@yahoogroups. <mailto:[email protected]>com <mailto:[email protected]>

<mailto:[email protected]>com <mailto:[email protected]>

<http://docs.yahoo.com/info/terms/>


*




Reply via email to