Jump to content

bile

Members
  • Posts

    9
  • Joined

  • Last visited

bile's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. When the callback function is called, requested data are in $hData. You can get data as string using _DdeGetDataAsString() Func OnDDE_AdvData($hSsz1,$hSsz2,$uFmt,$hData,$hConv) local $stringdata ; $hsz2 is a string containing the topic/item you requested (at least in my case) $stringdata=_DdeGetDataAsString($hData) ;......DO SOMETHING WITH $stringdata EndFunc Depending on the DDE server you are connecting to, I suppose _DdeGetDataAsString() may not be suitable...
  2. Go Here: GDI+ You'll find anything you need.
  3. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "biledde\DDEML.au3" #include "biledde\DDEMLClient.au3" #include <SQLite.au3> #include <SQLite.dll.au3> #Include <Timers.au3> #include <Math.au3> Opt("GUIonEventMode",1) opt("GUIEventOptions",0) AutoItSetOption("MustDeclareVars",1) Global $main,$timer $main=GUICreate("Test Timer",500,400,-1,-1,$WS_SIZEBOX) $timer=_Timer_SetTimer($main,1000,"timeout") GUISetState() while 1 sleep(2000) wend Func timeout() consolewrite("timeout!!!!!!!!!!!!!!!!!!!!!!!!") EndFunc Hello, I have a problem with my script using _Timer_setTimer every time the timer elapses, I get an "Error Allocating Memory" and the script crashes. As My script works fine without the timer, I tried to use it in a simple script, but I get the same result. What's wrong with it?? Could someone please help ?
  4. OK, I answer myself...it works perfectly, the library uses cdecl... I've been trying for three days...and 10 minutes after posting the solution came. Sorry, I'm a noob.
  5. Hi. I would like to use Gnu Scientific Library in my script, but my script crashes giving this error code !>09:03:27 AutoIT3.exe ended.rc:-1073741819 the script crashes when calling DllCall. DllOpen returns 1 (is that OK ???) and @error is 0 (after DllOpen call) of course the dll file is in my system32 folder Func TestDll() local $res $gsldll=DllOpen("libgsl.dll") logga($log,"GSL DLL HANDLER:"&$gsldll); logga() is a function I use to create a log logga($log,@error) $res=DllCall($gsldll,"double","gsl_cdf_ugaussian_P","double",0.15) logga($log,@error) EndFunc I can't understand what's wrong, has anyone ever used GSL ?? Any hint ??
  6. It is defined as the callback function for the event "AdvData" by the previous call to DDEInitialize. Remember to make your function return the value $DDE_FACK.
  7. logga($log,"Initializing DDE.....") ; logga is a function I use to create a log for my application, just ignore that $return=_DdeInitialize("OnDDE_", BitOR($APPCMD_CLIENTONLY, $CBF_SKIP_ALLNOTIFICATIONS)) if $return=0 then logga($log,"OK") Else logga($log,"DDEinitialize ERROR:"&$return) EndIf $hszService = _DdeCreateStringHandle("MYSERVER") $hszTopic = _DdeCreateStringHandle("MYTOPIC") $hConvSrv = _DdeConnect($hszService, $hszTopic) if $hconvSrv=0 Then logga($log,"DDEConnect ERROR") Else logga($log,"Connected") endif ;-----------------------------------intializing ADVISE LOOP--------------------------------------------- $hszItem = _DdeCreateStringHandle("MYITEM") $res = _DdeClientTransaction($XTYP_ADVSTART+$XTYPF_ACKREQ, $hConvSrv, 0, 10000, $hszItem, $CF_TEXT) ; ;...................... ;----------------------------------------------------------------------------------------------------------------- ; Func ON_DDE_AdvData ; ; $hSz1 and $hSz2 are strings containing the topic and item ; $uFmt ???? I don't know...my server sends 1 but can't figure out the meaning ; $hData is a handle to data, I use it calling _DdeGetDataAsString and it works fine ; $hConv handle to the DDE conversation ;----------------------------------------------------------------------------------------------------------------- Func OnDDE_AdvData($hSsz1,$hSsz2,$uFmt,$hData,$hConv) ; DO SOMETHING WITH DATA endfunc Hi tts...and thanks to doudou for this excellent job. I just wrote a simple client script to receive data from a DDE server (stocks quote...) in advise mode, hope it is useful. I still can't figure out the meaning of $uFmt passed to the OnDDE_AdvData function...any hints from someone? EDIT: OK found, It's the clipboard format :-b
  8. Hi, I am a new member of this forum and I have just discovered the world of Autoit. I need a script reading an IE window which is continuously updated. _IEreadbodytext works perfectly, but I need my script to read the data when they are updated. Guess I have to get some event from IE (Objevent ?) but I couldn't find clear documentation about how to do this. Could you please tell me where to search for docs?
×
×
  • Create New...