Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/29/2013 in all areas

  1. Sekhar, Look at SplashTextOn in the Help file. Or you might use my Toast and Notify UDFs which are designed for this sort of thing - the links are in my sig below. M23
    1 point
  2. The requirement sounds incomplete. I hope there isn't any more possibilities you have left. Here is what you ask ;working - match anything inbetween "<~li~>" , and replace everything with a "</li>" $string = StringRegExpReplace("< / li > < / li > < /li > < / li> < / li > </ li >", "<[^>/]*/[^>]*?li[^>]*>", "</li>") MsgBox( 64, "", $string) Regards
    1 point
  3. Added another example: _GDIPlus_IncreasingBalls.au3 (see 1st post). Br, UEZ
    1 point
  4. Melba23

    Refreshing labels

    WilliamWhite. My wife might object if you tried - but I will happily just accept the compliment! Glad I could help. M23
    1 point
  5. OK. now I see the problem! Do you see it too? Check the taskmanager for abc.bat. You won't find any. So it doesn't make sense to check for a process named "abc.bat". Use the following code instead: Runwait("D:\abc.bat") While 1 If Not ProcessExists("setup.exe") Then ExitLoop WEnd Runwait("D:\def.bat")
    1 point
  6. water

    reading subject in outlook

    I'm quite busy at the moment but hope to post an example this weekend.
    1 point
  7. PKG, The "flag and wrapper" method is certainly the easiest way in this case - this works for me: #include<GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) $FL = False Local $MainForm = GUICreate("Win_App-1", 550, 500) GUISetOnEvent($GUI_EVENT_CLOSE, "WinExit") Global $MyEditBox = GUICtrlCreateEdit("", 5, 30, 540, 270) GUICtrlSetBkColor($MyEditBox, 0xFF6347) Global $RunButton = GUICtrlCreateButton("&Run", 120, 420, 70, 30) GUICtrlSetOnEvent($RunButton, "Run_DataLoop") Global $StopButton = GUICtrlCreateButton("&Stop", 200, 420, 70, 30) GUICtrlSetOnEvent($StopButton, "Run_DataLoop") GUISetState() While 1 Sleep(10) ; Look for the flag If $FL Then ; Run the function DataLoop() EndIf WEnd Func WinExit() Exit 0 EndFunc ;==>WinExit ; This function will always run as the function to interrupt was started from the idle loop Func Run_DataLoop() Switch @GUI_CtrlId Case $RunButton $FL = True Case $StopButton $FL = False EndSwitch EndFunc Func DataLoop() ; Look for the flag While $FL ToolTip("Func Running") Sleep(10) WEnd ; And break out if it is cleared ToolTip("Function Stopped") Sleep(500) ToolTip("") Return EndFunc ;==>DataLoop Does it work for you too? M23
    1 point
  8. jdelaney

    SQL connection help

    You'll need to use ADODB directly, to connect to sql server...like: $oADODB = ObjCreate("ADODB.Connection") $oADODB.Open ("Driver={SQL Server};Server=53.90.111.22;Database=crm_user;Uid=cos_user;Pwd=1q2w3e4r5t") The mysql functions will probably not work for you (please correct me if wrong) I use this:...pass in the connection string, and the SQL query...it returns the results: Func WGe_SQLStatement($sCallersConnectionString, $sCallersSQLStatement) ; Perform a SQL Query $ado = ObjCreate("ADODB.Connection") If @error = 1 Then Return False EndIf $adors = ObjCreate("ADODB.RecordSet") If @error = 1 Then Return False EndIf $ado.Open($sCallersConnectionString) $adors.Open($sCallersSQLStatement, $ado) ; Only get records if there are records to receive If $adors.Fields.Count > 0 Then Dim $aReturn[1][1] $iField = 0 ; Create the First record of the array with the Field names For $Field In $adors.Fields ReDim $aReturn[1][$iField + 1] $aReturn[0][$iField] = $Field.name $iField += 1 Next $iRow = 1 While Not $adors.EOF $iField = 0 For $Field In $adors.Fields $sValue = $adors.Fields($Field.name).value ReDim $aReturn[$iRow + 1][UBound($aReturn, 2)] $aReturn[$iRow][$iField] = $sValue ;Var_SetLogAndActOnState ( 2, 2, "SqlAndSubmitExtRpt()", "Submitted data fro patient#=[" & $iPatient & "]; MRN=[" & $sPID & "]; PatientName=[" & $sLast & " ," & $sFirst & "].", False, False) $iField += 1 Next $adors.MoveNext $iRow += 1 WEnd ; Close the recordset $adors.Close $adors = 0 Else $aReturn = True EndIf ; Close ADODB connection $ado.Close $ado = 0 If IsArray($aReturn) Then If UBound($aReturn) > 1 Then Return $aReturn EndIf EndIf Return True EndFunc ;==>WGe_SQLStatement
    1 point
  9. You're all making this way more complex than it really is. The UTF-16 LE (or rather UCS2-LE that AutoIt uses) to ANSI conversion will use the codepage specified in the _WinAPI_MultiByteToWideChar call. So the conversion you need is: #include <WinAPI.au3> $string = "שָׁלוֹם" ; shalom in Hebrew $out = _WinAPI_WideCharToMultiByte($string, 1255) ; explicit Hebrew codepage Pass $out to your old application.
    1 point
×
×
  • Create New...