Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/05/2012 in all areas

  1. [NEW VERSION] - 2 Aug 18 Added: When specifying the icon to use, if the $vIcon parameter is set to the name of an ico or exe file, the main icon within will be displayed, but if a trailing "|" followed by the icon index is added to the name, that icon from within the file is used New UDF and example in the zip below. Details of previous versions: Changelog.txt A forum query about the small pop-ups that some apps produce from the systray led me to create my version of how this can be done. By the way, I call these small GUIs "Toasts" for obvious reasons! A zip containing the UDF, an example script and my StringSize UDF (which is also required): Toast.zip As always, kind comments and constructive criticisms welcome - particularly the former! M23
    1 point
  2. The parameter after the $iStart parameter sets whether it wraps around to the beginning of the list once it hits the end. It is set by default to wrap around, set it to False and it won't wrap to the beginning.
    1 point
  3. Yes. It was me. I saw how some dumb freaks use AutoIt for games automation giving it nothing but bad name and I decided to put end to it. I created, with no fake modesty, trully amazing and brilliant plan. Then I executed it using several beta versions of AutoIt, bit by bit. Now in order to do the thing you do you have to use your brain. Isn't that something.
    1 point
  4. There's no case sensitivity for variable names in AutoIt. $mypath = $mYpAtH as far as AutoIt is concerned.
    1 point
  5. Valik

    Strange Syntax

    Whether you want to call it that or not you are writing a simple language if you intend to sanitize user input. If you don't sanitize user input then you have knowingly written a security hole.
    1 point
  6. Take the .au3 file and copy it to the "Include" directory of AutoIt, your user defined "Include directory" or the directory where your script is located. Unfortunately you can't include the help file of an UDF into the help file of AutoIt so that the UDF's help file pops up when you press F1 in SciTE.
    1 point
  7. quinch, Stop guessing and look at the code and the SciTE Help file in which you found it: In the SciTE Help file: ; Add extra files to the resources #AutoIt3Wrapper_Res_File_Add= ; Filename[,Section [,ResName[,LanguageCode]]] to be addedSo looking at the code: #AutoIt3Wrapper_Res_File_Add=C:WINDOWSMediatada.wav, SOUND, MYWAVwe see that: - Filename = C:WINDOWSMediatada.wav (what we want to hear) - Section = SOUND (hardly surprising!) - ResName = MYWAV (how we refer to the resource later) The next bit of the code: Global Const $SND_RESOURCE = 0x00040004 Global Const $SND_ASYNC = 1You see the Const bit? That indicates that the value concerned is a constant which is usually used in some form of function call - it is easier for us mere humans to understand a textual constant than a "magic number". And now we play the sound: DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", $SND_RESOURCE)Call the "winmm.dll" and ask it to run its internal "PlaySound" function on the resource known as "MYWAV" (which we set earlier) which it will find in the "SOUND" section of the resource table (because that is what the constant value means to the DLL). As I mentioned earlier, the script will pause while the sound plays. If we want it continue, we need to use the ASYNC constant as well - we use BitOR to combine them (see the Setting Styles tutorial in the Wiki to see why ). The loop just proves that the script does indeed continue: DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", BitOR($SND_RESOURCE, $SND_ASYNC)) For $n = 1 To 100 Sleep(15) ToolTip("Asynch! " & $n) NextClearer now? M23
    1 point
  8. I got the solution. The problem for i am getting the error message is we have upgraded our SQL server to 2008 version.The Function _SQL_Connect() is not suppporting SQL2008. so we need to modify the function slightly. Please find the modified function below and try with this if anyone face the similar issue. Func _SQL_Connect($ADODBHandle, $server, $db, $username, $password, $SQLAuth = True) $SQLErr = "" If $ADODBHandle = -1 Then $ADODBHandle = $SQL_LastConnection If Not IsObj($ADODBHandle) Then $SQLErr = "Invalid ADODB.Connection object, use _SQL_Startup()" Return SetError($SQL_ERROR, 0, $SQL_ERROR) EndIf If $SQLAuth = True then $ADODBHandle.Open("DRIVER={SQL Server Native Client 10.0};SERVER=" & $server & ";DATABASE=" & $db & ";uid=" & $username & ";pwd=" & $password & ";") ;<==This line has been modified from [$ADODBHandle.Open("DRIVER={SQL Server};SERVER=" & $server & ";DATABASE=" & $db & ";uid=" & $username & ";pwd=" & $password & ";")] Else $ADODBHandle.Properties("Integrated Security").Value = "SSPI" $ADODBHandle.Properties("User ID") = $username $ADODBHandle.Properties("Password") = $password $ADODBHandle.Open("DRIVER={SQL Server};SERVER=" & $server & ";DATABASE=" & $db ) EndIf If Not @error Then Return SetError($SQL_OK, 0, $SQL_OK) Else $SQLErr = "Connection Error" Return SetError($SQL_ERROR, 0, $SQL_ERROR) EndIf EndFunc ;==>_SQL_Connect Note: Now all set free for me and works great!
    1 point
×
×
  • Create New...