 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
daonlyfreez
Joined: 16 Mar 2005 Posts: 949 Location: Berlin
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Wed Jun 24, 2009 5:45 pm Post subject: |
|
|
Looks like very cool control. Ty for notification. _________________
 |
|
| Back to top |
|
 |
fasto
Joined: 22 May 2009 Posts: 12
|
Posted: Wed Jun 24, 2009 6:22 pm Post subject: cool |
|
|
| qhtm is also good but yeah, htmllayout is way better. |
|
| Back to top |
|
 |
Chance
Joined: 30 Dec 2010 Posts: 15
|
Posted: Fri Jan 07, 2011 3:34 pm Post subject: |
|
|
Hi majkinetor,
is there a way to update the text of a QHTM_Add ?
| Code: |
#include QHTM.ahk
QHTM_Init("qhtm.dll")
#SingleInstance force
Gui, +LastFound
hGui := WinExist()
w := 800, h := 700
hQhtm := QHTM_Add( hGui, "Some interesting text", 0, 0, w, h, "", "")
Gui, show, w%w% h%h%
return
Esc::
exitapp
return
|
I want to update the content of the QHTM_Add based on a function containing a timer for example. Is there a way to do this without destroying / rebuilding the gui ? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
|
| Back to top |
|
 |
Chance
Joined: 30 Dec 2010 Posts: 15
|
Posted: Fri Jan 07, 2011 3:53 pm Post subject: |
|
|
Ok, I maybe found a way to updating my text :
| Code: |
#include QHTM.ahk
QHTM_Init("qhtm.dll")
#SingleInstance force
Gui, +LastFound
hGui := WinExist()
w := 800, h := 700
hQhtm := QHTM_Add( hGui, "some text", 0, 0, w, h, "", "")
Gui, show, w%w% h%h%
count := 0
return
F5::
;refresh data
SetTimer, UpdateText, 1200
UpdateText:
count++
hQhtm := QHTM_Add( hGui, count, 0, 0, w, h, "", "")
return
Esc::
exitapp
return
|
I just rewrite html on the previous text. Is there some consequence for memory usage is I let this script running cause each time I add a QHTM_Add and as I have some flickering (not a problem for the purpose of my script) on my screen, I can see the previous content of the text => so content is not destroy and I just add text over the previous.
Do you think there is a better way to update the text ?
Regards.
EDIT : ok I have post this in the same time you post your answer, I will have a look on the AddHtml function  |
|
| Back to top |
|
 |
Chance
Joined: 30 Dec 2010 Posts: 15
|
Posted: Fri Jan 07, 2011 4:24 pm Post subject: |
|
|
| majkinetor wrote: | | http://www.autohotkey.net/~majkinetor/qhtm/qhtm.html#AddHtml |
Ok, I have modified my previous script to use QHTM_AddHtml, but the text is not replaced by the new one, new text is just added at the end of the old text, no matter what the value of the bScroll param
| Code: |
#include QHTM.ahk
QHTM_Init("qhtm.dll")
#SingleInstance force
Gui, +LastFound
hGui := WinExist()
w := 800, h := 700
hQhtm := QHTM_Add( hGui, "Some text", 0, 0, w, h, "", "")
Gui, show, w%w% h%h%
count := 0
return
F5::
;refresh data
SetTimer, UpdateText, 1200
UpdateText:
count++
QHTM_AddHtml(hQhtm, count, false)
;hQhtm := QHTM_Add( hGui, count, 0, 0, w, h, "", "")
return
Esc::
exitapp
return
|
Is there something wrong in the way I use QHTM_AddHtml ? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Fri Jan 07, 2011 7:47 pm Post subject: |
|
|
You can clear control with:
| Code: | | ControlSetText, , , ahk_id %hQhtm% |
_________________
 |
|
| Back to top |
|
 |
Chance
Joined: 30 Dec 2010 Posts: 15
|
Posted: Mon Jan 10, 2011 1:53 pm Post subject: |
|
|
Thanks majkinetor, that works !!!  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|