Leaderboard
Popular Content
Showing content with the highest reputation on 03/31/2015 in all areas
-
Hi, The latest forum upgrade seems to have completely messed up some complex signatures - please check yours to make sure it is still as you want it to appear. And can I take this opportunity to remind you all that sigs should not be too large (think of using a spoiler to hide text walls) nor advertise external products. Be prepared to find them edited if we think they do not meet these requirements. M233 points
-
I found a few related topics for some reference: Basically the issue has always been how to interpret and work with the results of IsAdmin() when running under UAC, and the desire for developers to not force the use of #RequireAdmin (or the AutoIt3Wrapper manifest equivalent) for all of their users. A lot of programs have that nice 'Elevate' button which is presented to you when the function is available, to selectively elevate the application and enable administrative functions. Here's my attempt at detecting this scenario. The function will return the current admin status, and the ability of the current app to elevate itself under UAC in @extended. A small example should show how it is used. The example can be run from SciTE or compiled, allowing you to test all kinds of scenarios. Something interesting I found... if an app is launched from another fully elevated app, and that new app is launched with restricted privileges by way of the SAFER api, then that app CANNOT re-elevate itself to full admin status. The other way to lower a launched app's privileges uses either CreateProcessAsUser or CreateProcessWithTokenW (there are scripts on the forum that show their usage). Apps launched with either of those functions CAN re-elevate themselves to full admin status. _IsUACAdmin #include <Security.au3> ; #FUNCTION# ==================================================================================================================== ; Name ..........: _IsUACAdmin ; Description ...: Determines if process has Admin privileges and whether running under UAC. ; Syntax ........: _IsUACAdmin() ; Parameters ....: None ; Return values .: Success - 1 - User has full Admin rights (Elevated Admin w/ UAC) ; Failure - 0 - User is not an Admin, sets @extended: ; | 0 - User cannot elevate ; | 1 - User can elevate ; Author ........: Erik Pilsits ; Modified ......: ; Remarks .......: THE GOOD STUFF: returns 0 w/ @extended = 1 > UAC Protected Admin ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _IsUACAdmin() ; check elevation If StringRegExp(@OSVersion, "_(XP|20(0|3))") Or (Not _IsUACEnabled()) Then ; XP, XPe, 2000, 2003 > no UAC ; no UAC available or turned off If IsAdmin() Then Return SetExtended(0, 1) Else Return SetExtended(0, 0) EndIf Else ; check UAC elevation ; ; get process token groups information Local $hToken = _Security__OpenProcessToken(_WinAPI_GetCurrentProcess(), $TOKEN_QUERY) Local $tTI = _Security__GetTokenInformation($hToken, $TOKENGROUPS) _WinAPI_CloseHandle($hToken) ; Local $pTI = DllStructGetPtr($tTI) Local $cbSIDATTR = DllStructGetSize(DllStructCreate("ptr;dword")) Local $count = DllStructGetData(DllStructCreate("dword", $pTI), 1) Local $pGROUP1 = DllStructGetPtr(DllStructCreate("dword;STRUCT;ptr;dword;ENDSTRUCT", $pTI), 2) Local $tGROUP, $sGROUP = "" ; ; S-1-5-32-544 > BUILTINAdministrators > $SID_ADMINISTRATORS ; S-1-16-8192 > Mandatory LabelMedium Mandatory Level (Protected Admin) > $SID_MEDIUM_MANDATORY_LEVEL ; S-1-16-12288 > Mandatory LabelHigh Mandatory Level (Elevated Admin) > $SID_HIGH_MANDATORY_LEVEL ; SE_GROUP_USE_FOR_DENY_ONLY = 0x10 ; ; check SIDs Local $inAdminGrp = False, $denyAdmin = False, $elevatedAdmin = False, $sSID For $i = 0 To $count - 1 $tGROUP = DllStructCreate("ptr;dword", $pGROUP1 + ($cbSIDATTR * $i)) $sSID = _Security__SidToStringSid(DllStructGetData($tGROUP, 1)) If StringInStr($sSID, "S-1-5-32-544") Then ; member of Administrators group $inAdminGrp = True ; check for deny attribute If (BitAND(DllStructGetData($tGROUP, 2), 0x10) = 0x10) Then $denyAdmin = True ElseIf StringInStr($sSID, "S-1-16-12288") Then $elevatedAdmin = True EndIf Next ; If $inAdminGrp Then ; check elevated If $elevatedAdmin Then ; check deny status If $denyAdmin Then ; protected Admin CANNOT elevate Return SetExtended(0, 0) Else ; elevated Admin Return SetExtended(1, 1) EndIf Else ; protected Admin Return SetExtended(1, 0) EndIf Else ; not an Admin Return SetExtended(0, 0) EndIf EndIf EndFunc ;==>_IsUACAdmin Func _IsUACEnabled() Return (RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA") = 1) EndFunc ;==>_IsUACEnabled Example #include <_IsUACAdmin.au3> #include <GuiButton.au3> #include <GuiConstantsEx.au3> $g = GUICreate("UAC Test", 200, 100) $b = GUICtrlCreateButton("Elevate", 200-72, 100-27, 70, 25) _GUICtrlButton_SetShield($b) $admin = _IsUACAdmin() $canelevate = @extended GUICtrlCreateLabel("IsAdmin (built-in): " & (IsAdmin() = 1), 4, 4) GUICtrlCreateLabel("_IsUACAdmin (full admin): " & ($admin = 1), 4, 24) GUICtrlCreateLabel("Process can elevate: " & ($canelevate = 1), 4, 44) If $admin Or (Not $canelevate) Then GUICtrlSetState($b, $GUI_DISABLE) GUISetState() While 1 Switch GUIGetMsg() Case -3 ExitLoop Case $b ; restart elevated If @Compiled Then ShellExecute(@ScriptFullPath, "", @WorkingDir, "runas") Else ShellExecute(@AutoItExe, '/AutoIt3ExecuteScript "' & @ScriptFullPath & '"', @WorkingDir, "runas") EndIf Exit EndSwitch WEnd2 points
-
Extended Message Box - New Version: 16 Feb 24
hudsonhock reacted to Melba23 for a topic
Are you annoyed by the limitations of the standard Windows message dialog created by MsgBox? Would you like to have coloured backgrounds and text? To choose the justification and font? Do you want to be able to place the message box other than in the centre of the screen? Centred on your GUI, for example, or at a particular location on screen? What about having user-defined text on as many buttons as you need? And user-defined icons? Or a visible countdown of the timeout? Finally, would you like to choose whether the message box has a button on your already too-crowded taskbar? If the answer to any of these questions is "YES" then the ExtMsgBox UDF is for you! [NEW VERSION] 16 Feb 24 Changed: Some additional functionality added to the "TimeOut" parameter of _ExtMsgBox: - A positive integer sets the EMB timeout as before. - A negative integer will double the size of the countdown timer if it is used. - A colon-delimited string (eg: "10:5") will set the normal EMB timeout (first integer) and will also initially disable the EMB buttons for the required period (second integer). New UDF and examples in the zip. Older version changes: ChangeLog.txt As always, I realise nearly all of the DLL calls in these UDFs could be made by using commands in other UDFs like WinAPI.au3 - but as with all my UDFs (which you can find in my sig below) I am trying to prevent the need for any other include files. The UDF and examples (plus StringSize) in zip format: ExtMsgBox.zip Courteous comments and constructive criticisms welcome - guess which I prefer! M231 point -
I love chiptune music, but BASS only support XM, IT, S3M, MOD, MTM, UMX and MO3 file format for MOD music. 1 | Nintendo NES and SNES Sound File Players May be you already have some files with extension nsf, nsfe, spc or rsn (unzip rsn files for get spc collection files inside) but you can't play them in a AutoIt script ? So I searched around a bit, and found 2 DLL ( nsf_player.dll and spc_player.dll ) for play Nintendo NES and SNES Sound Files. Interest of those DLL is that they can play from file path or binary data, avoiding temp files. Dll and audio files are embedded in scripts for permit you to test them right away. Some info/download links are in front of each script. 2 | ModPlug Player Another dll found : npmod32.dll who support mod, s3m, xm, med, it, s3z, mdz, itz, xmz and wav files. Interest : it can play some rares chiptune formats, you can also pause, set volume and set position. Inconvenient : do not load from binary datas. Dll and audio files are embedded in script and i have added a gui for permit you to try right away ! Warning : Do not work on Win8. 3 | ZXTune Player 2 (basszxtune.dll v2.4.5) UPDATE of 23 DEC 2016 Using BASSZXTUNE chiptune support for BASS ( Support as0, asc, ay, ftc, gtr, psc, psg, psm, pt1, pt2, pt3, sqt, st1, s, st3, stc, stp, ts, txt, vtx, ym, chi, dmm, dst, m, sqd, str, sid, cop, tf0, tfc, tfd, tfe, $b, $m, ahx, ayc, bin, cc3, d, dsq, esv, fdi, gam, gamplus, gbs, gym, hes, hrm, hrp, lzs, msp, mtc, nsf, nsfe, p, pcd, sap, scl, spc, szx, td0, tlz, tlzp, trd, trs, vgm ) Interest : it can play lot of rares chiptune formats, while benefiting from all bass functions. Inconvenient : dll size.(5860ko) Dll and audio files are embedded in script. 4 | TitchySID Player Files and dll are loaded in memory. Interest : dll size (8ko), you can Play/Stop/Pause/Resume and choose which subsong to play. Inconvenient : only SID audio files supported ( PSID & RSID) Dll and audio files are embedded in script. Tested under Win7 and Win8. Edit : added a Sid header viewer : SidHeaderViewer.au3 5 | MiniFmod Player Interest : dll size (20ko) Inconvenient : only xm audio files supported. 6 | Npnez Player Using npnez.dll (88ko) for play Gameboy Sound System audio files and some others ( kss, hes, nsf, ay, gbr, gbs, gb, nsd, sgc ) Interest : Can be loaded in memory, subsong can be set and volume can be adjusted ( perfect for create a fade when exiting ) Inconvenient : for an unknow reason, only 20% of my hes collection is playable... 7 | µFMOD Player Interest : dll size (10ko), can be loaded in memory, support Play/Stop/Pause/Resume actions and volume can be adjusted ( perfect for create a fade when exiting ) Inconvenient : only xm audio files supported. 8 | MagicV2m Player Interest : dll size (20ko), Play/Stop/IsPlay/SetAutoRepeat/Progress Inconvenient : only v2m audio files supported, V2mPlayStream is not reliable, so prefer V2mPlayFile instead. 9 | OSMEngine Player OSMEngine.dll (80 ko)(Oldskool Musics Engine) permit to play snd, sndh, fc, fc4, fc14 and some rare jam audio files from Amiga/Atari ST(E) Interest : audio can be loaded in memory, and Pause/Resume/SetVolume/GetInfos are available Inconvenient : none at the moment. 10 | Ayfly Player Ayfly.dll (268 ko) is a AY-891x emulator and player who support the following tracker formats : aqt, asc, ay, fxm, gtr, psc, psg, pt1, pt2, pt3, sqt, stc, stp, vtx, ym and zxs (ZX Spectrum Emulator Snapshot) files. Interest : SetVolume/GetInfos are available Inconvenient : a function named "ay_initsongindirect" for load module in memory exists, but due to the poor documentation provided i do not succeed to get it to work... 11 | GMGME Player GMGME.dll is a emulated music DLL that allows you to play ay, gbs, gym, hes, kss, nsf/nsfe, sap, spc and vgm files. Interest : Can play ATARI SAP files (only type B and C) , Set Volume and Set Tempo are available Inconvenient : Dll Size (and his imports) , and audio files can not be loaded in memory. 12 | SC68 Player sc68replay.dll (166 ko) is a Freebasic DLL compiled from "sc68replay" src that allows you to play SC68 (Atari ST and Amiga audio formats) files. Interest : Can play from file and memory Inconvenient : Unfortunatelly for an unknown reason not all sc68 files are supported. 13 | Extended Module Player LibXmp.dll (272 ko) can "read" xm, mod, it, s3m, med, 669 but also some rares formats abk, amd, amf, dbm, digi, dtm, emod, far, flx, fnk, gdm, hsc, imf, j2b, liq, m15, mdl, mfp, mgt, mtm, mtn, okt, psm, ptm, rad, rtm, sfx, smp, stim, stm, stx, ult, umx, wow, ym3812 Despite its name, it's not a "player" but a library that renders module files to RAW PCM data. So the interest in this script was to find a way to convert those raw datas into a "playable" sound. With Waveform Audio Interface i create a pseudo Wav header who permit to play datas as a Wav file. Interest : Can play from file and memory Inconvenient : Time to render datas (depends of file size) 14 | LibModPlug Player LibModPlug.dll (102 ko) can "read" xm, it, mod, s3m, med, 669 and also amf, ams, dbm, dmf, dsm, far, j2b, mdl, mt2, mtm, okt, psm, ptm, stm, ult, umx. As LibXmp.dll, it's a library that renders module files to RAW PCM data. For this one, i create a real binary wave header for be able to play it easily from memory with winmm.dll PlaySoundW function. Interests : Can play from file and memory, and have some nice sound effects : Surround, MegaBass and Reverb (used in script example) It can also replace modplug player(2) for Win 8+ users Inconvenient : Time to render datas (depends of file size) 15 | AdPlug Player AdPlug.dll ( 69ko ) is an AdLib sound player library who is able to play the following files type : A2M, ADL, AMD, BAM, CFF, CMF, D00, DFM, DMO, DRO, DTM, HSC, HSP, IMF, KSM, LAA, LDS, M, MAD, MID, MKJ, MSC, MTK, RAD, RAW, RIX, ROL, S3M, SA2, SAT, SCI, SNG, XAD, XMS, XSM For this one, time to render datas is to long, so i needed to find an other way for play modules. Using Bass.dll and particulary the "BASS_StreamPutData" function i succeeded to play module in loop while rendering it. Both DLL are loaded in memory, and 16 different module types are available in the script. No includes/files needed. Just run it. Warning : for a unique file extension (example .sng), it's sometimes possible to have several filetypes from different trackers ! AdPlug.dll Imports : msvcp71.dll, msvcr71.dll in C:\Windows\SysWOW64 ( VC Redist Installer ) Interests : Can read some obscure rare formats. Inconvenient : Can not read from memory 16 | LibMikmod Player LibMikmod.dll (85ko) will currently play the following common and not so common formats : 669, AMF, DSM, FAR, GDM, IMF, IT, MED, MOD, MTM, S3M, STM, STX, ULT, UNI, XM Interests : Can load from memory Inconvenient : only for full-screen applications, because if the application has not the focus sound is muted Downloads are available in the download section Dedicated to chiptune Lovers ! Music Links : asma.atari.org woolyss.com chipmusic.org demozoo.org modarchive.org modules.pl keygenmusic.net zxtunes.com mazemod.org amigaremix.com pouet.net plopbox.eu Modland1 point
-
CrowdinAPI UDF
argumentum reacted to mLipok for a topic
Today I want to present my current project. This is UDF for crowdin.net website API In fact, not yet finished but functional. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 #Tidy_Parameters=/sort_funcs /reel #include <FileConstants.au3> #include <MsgBoxConstants.au3> _Crowdin_Example_1() Func _Crowdin_Example_1() Local $sACCOUNT_API_KEY = '...' Local $sPROJECT_API_KEY = '...' Local $sPROJECT_identifier = '...' Local $output = '' _Crowdin_Project_Identifier($sPROJECT_identifier) _Crowdin_Project_ApiKey($sPROJECT_API_KEY) _Crowdin_AccountKey($sACCOUNT_API_KEY) $output = _Crowdin_DirectoryCreate('Directory for testing CrowdinAPI') MsgBox(0, '_Crowdin_DirectoryCreate', $output) Exit $output = _Crowdin_GetProjectInfo() MsgBox(0, '_Crowdin_GetProjectInfo', $output) $output = _Crowdin_GetSupportedLanguages() MsgBox(0, '_Crowdin_GetSupportedLanguages', $output) $output = _Crowdin_TranslationExport() MsgBox(0, '_Crowdin_TranslationExport', $output) $output = _Crowdin_TranslationStatus() MsgBox(0, '_Crowdin_TranslationStatus', $output) $output = _Crowdin_TranslationDownload('all', @ScriptDir & '\Crowdin_test_DownloadTranslations.zip') $output = _Crowdin_GetProjects('mLipok') MsgBox(0, '_Crowdin_GetProjects', $output) $output = _Crowdin_DirectoryCreate('Directory for testing CrowdinAPI') MsgBox(0, '_Crowdin_DirectoryCreate', $output) ;~ $output = ;~ MsgBox(0, '', $output) EndFunc ;==>_Crowdin_Example_1 #Region CrowdinAPI - Functions ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_GetProjectInfo ; Description ...: Get Crowdin Project details. ; Syntax ........: _Crowdin_GetProjectInfo() ; Parameters ....: ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Crowdin_GetProjectInfo() Local $sURL = 'https://api.crowdin.com/api/project/' & _Crowdin_Project_Identifier() & '/info?key=' & _Crowdin_Project_ApiKey() ConsoleWrite('! ' & $sURL & @CRLF) Local $oXmlHttp = ObjCreate("Microsoft.XMLHTTP") $oXmlHttp.Open('POST', $sURL, False) $oXmlHttp.Send() Local $output = $oXmlHttp.ResponseText $oXmlHttp = '' Return $output EndFunc ;==>_Crowdin_GetProjectInfo ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_GetSupportedLanguages ; Description ...: ; Syntax ........: _Crowdin_GetSupportedLanguages() ; Parameters ....: ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Crowdin_GetSupportedLanguages() Local $sURL = 'https://api.crowdin.com/api/supported-languages' ConsoleWrite('! ' & $sURL & @CRLF) Local $oXmlHttp = ObjCreate("Microsoft.XMLHTTP") $oXmlHttp.Open('GET', $sURL, False) $oXmlHttp.Send() Local $output = $oXmlHttp.ResponseText $oXmlHttp = '' Return $output EndFunc ;==>_Crowdin_GetSupportedLanguages ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_TranslationExport ; Description ...: ; Syntax ........: _Crowdin_TranslationExport() ; Parameters ....: ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Crowdin_TranslationExport() Local $sURL = 'https://api.crowdin.com/api/project/' & _Crowdin_Project_Identifier() & '/export?key=' & _Crowdin_Project_ApiKey() ConsoleWrite('! ' & $sURL & @CRLF) Local $oXmlHttp = ObjCreate("Microsoft.XMLHTTP") $oXmlHttp.Open('GET', $sURL, False) $oXmlHttp.Send() Local $output = $oXmlHttp.ResponseText $oXmlHttp = '' Return $output EndFunc ;==>_Crowdin_TranslationExport ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_TranslationStatus ; Description ...: Track your Crowdin project translation progress by language. Default response format is XML. ; Syntax ........: _Crowdin_TranslationStatus() ; Parameters ....: ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://crowdin.com/page/api/status ; Example .......: No ; =============================================================================================================================== Func _Crowdin_TranslationStatus() Local $sURL = 'https://api.crowdin.com/api/project/' & _Crowdin_Project_Identifier() & '/status?key=' & _Crowdin_Project_ApiKey() ConsoleWrite('! ' & $sURL & @CRLF) Local $oXmlHttp = ObjCreate("Microsoft.XMLHTTP") $oXmlHttp.Open('POST', $sURL, False) $oXmlHttp.Send() Local $output = $oXmlHttp.ResponseText $oXmlHttp = '' Return $output EndFunc ;==>_Crowdin_TranslationExport ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_TranslationDownload ; Description ...: Download ZIP file with translations. You can choose the language of translation you need or download all of them at once. ; Syntax ........: _Crowdin_TranslationDownload([$sPackage = 'all'[, $sZIP_FileFullPath = '']]) ; Parameters ....: $sPackage - [optional] a string value. Default is 'all'. ; $sZIP_FileFullPath - [optional] a string value. Default is ''. ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://crowdin.com/page/api/download ; Example .......: No ; =============================================================================================================================== Func _Crowdin_TranslationDownload($sPackage = 'all', $sZIP_FileFullPath = '') ; GET https://api.crowdin.com/api/project/{project-identifier}/download/{package}.zip?key={project-key} Local $sURL = 'https://api.crowdin.com/api/project/' & _Crowdin_Project_Identifier() & '/download/' & $sPackage & '.zip?key=' & _Crowdin_Project_ApiKey() ConsoleWrite('! ' & $sURL & @CRLF) Local $oXmlHttp = ObjCreate("Microsoft.XMLHTTP") $oXmlHttp.Open('GET', $sURL, False) $oXmlHttp.Send() Local $output = $oXmlHttp.ResponseBody ;~ Local $type = $oXmlHttp.ResponseType ;~ MsgBox(0, VarGetType($type) & '='&$type&'=' , VarGetType($output)) ;~ MsgBox(0, '', BinaryLen($output)) If $sZIP_FileFullPath <> '' Then Local $hFile = FileOpen($sZIP_FileFullPath, $FO_OVERWRITE + $FO_BINARY) FileWrite($hFile, $output) FileClose($hFile) EndIf $oXmlHttp = '' Return $output EndFunc ;==>_Crowdin_TranslationDownload ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_GetProjects ; Description ...: Get Crowdin Project details. ; Syntax ........: _Crowdin_GetProjects($sLoginName) ; Parameters ....: $sLoginName - A string value. Your Crowdin Account login name. ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://crowdin.com/page/api/get-projects ; Example .......: No ; =============================================================================================================================== Func _Crowdin_GetProjects($sLoginName) ; https://api.crowdin.com/api/account/get-projects?account-key={account-key} Local $sURL = 'https://api.crowdin.com/api/account/get-projects?account-key=' & _Crowdin_AccountKey() & '&login=' & $sLoginName ConsoleWrite('! ' & $sURL & @CRLF) Local $oXmlHttp = ObjCreate("Microsoft.XMLHTTP") $oXmlHttp.Open('POST', $sURL, False) $oXmlHttp.Send('') Local $output = $oXmlHttp.ResponseText $oXmlHttp = '' Return $output EndFunc ;==>_Crowdin_GetProjects ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_DirectoryCreate ; Description ...: Add directory to Crowdin project. ; Syntax ........: _Crowdin_DirectoryCreate($sDirectoryName) ; Parameters ....: $sDirectoryName - A string value. ; Return values .: None ; Author ........: Your mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://crowdin.com/page/api/add-directory ; Example .......: No ; =============================================================================================================================== Func _Crowdin_DirectoryCreate($sDirectoryName) ; https://api.crowdin.com/api/project/{project-identifier}/add-directory?key={project-key} Local $sURL = 'https://api.crowdin.com/api/project/' & _Crowdin_Project_Identifier() & '/add-directory?key=' & _Crowdin_Project_ApiKey() & '&name=' & $sDirectoryName ConsoleWrite('! ' & $sURL & @CRLF) Local $oXmlHttp = ObjCreate("Microsoft.XMLHTTP") $oXmlHttp.Open('POST', $sURL, False) $oXmlHttp.Send('') Local $output = $oXmlHttp.ResponseText $oXmlHttp = '' Return $output EndFunc ;==>_Crowdin_GetProjects #EndRegion CrowdinAPI - Functions #Region CrowdinAPI - SETUP ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_Project_ApiKey ; Description ...: ; Syntax ........: _Crowdin_Project_ApiKey([$vApiKey = Default]) ; Parameters ....: $vApiKey - [optional] a variant value. Default is Default. ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://crowdin.com/page/api/authentication ; Example .......: No ; =============================================================================================================================== Func _Crowdin_Project_ApiKey($vApiKey = Default) Local Static $sPROJECT_API_KEY = '' If $vApiKey = Default Then Return $sPROJECT_API_KEY Else $sPROJECT_API_KEY = $vApiKey Return $sPROJECT_API_KEY EndIf EndFunc ;==>_Crowdin_Project_ApiKey ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_Project_Identifier ; Description ...: ; Syntax ........: _Crowdin_Project_Identifier([$vIdentifier = Default]) ; Parameters ....: $vIdentifier - [optional] a variant value. Default is Default. ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://crowdin.com/page/api/authentication ; Example .......: No ; =============================================================================================================================== Func _Crowdin_Project_Identifier($vIdentifier = Default) Local Static $sPROJECT_identifier = '' If $vIdentifier = Default Then Return $sPROJECT_identifier Else $sPROJECT_identifier = $vIdentifier Return $sPROJECT_identifier EndIf EndFunc ;==>_Crowdin_Project_Identifier ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Crowdin_AccountKey ; Description ...: ; Syntax ........: _Crowdin_AccountKey([$vAccountKey = Default]) ; Parameters ....: $vAccountKey - [optional] A variant value. Default is Default. ; Return values .: None ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: https://crowdin.com/settings#user-profile-api-key ; Example .......: No ; =============================================================================================================================== Func _Crowdin_AccountKey($vAccountKey = Default) Local Static $sACCOUNT_API_KEY = '' If $vAccountKey = Default Then Return $sACCOUNT_API_KEY Else $sACCOUNT_API_KEY = $vAccountKey Return $sACCOUNT_API_KEY EndIf EndFunc ;==>_Crowdin_AccountKey #EndRegion CrowdinAPI - SETUP CrowdinAPI_v0.1.au3 have fun, mLipok1 point -
Look at the func in the helpfile Put a timeout and a ProcessExists condition ProcessWait("notepad.exe", 5) ; 5 seconds Msgbox(0,"ProcessExists", (ProcessExists("notepad.exe")<>0) ? "yes" : "no")1 point
-
ProcessWait("blabla.exe") ; Wait for Notepad process Run('"C:\Windows\System32\shutdown.exe" -f -s -t 15')1 point
-
wait for process
deepdown reacted to JLogan3o13 for a topic
ProcessExists Edit: Look in the help file under this function. The example is pretty much exactly what you are asking for.1 point -
You can always enclose a schema name (table, column, index, FK, whatever) inside double quotes, square brackets or backquotes (for compatibility with MySQL). This way you can have any Unicode character in the name including whitespaces (except control chars). For instance (sorry for the French): CREATE TABLE "Téléfuté" ( "Pays" CHAR, "Depuis ligne FT" CHAR, "Ligne dégroupée" CHAR, "TTC/h pleine" INT, "TTC/h creuse" INT); Also note that char, varchar, varchar(148), characteristic and any word containing "char" is equivalent to anything containing "text" and simply means "string affinity" for SQLite. You can store any SQLite type in any column regardless of its declared type.1 point
-
Haha, yes you do!1 point
-
Hey fbar, Just so we can easily look over your code, might you use autoit code tags to put your code into? easily done like so [ autoit ] ;code goes here [ /autoit ] (remove the spaces). Or you can use the blue A (code) in the toolbar. Local Enum $test = 1000 ; just an example1 point
-
Easily check the title with StringinStr()1 point
-
I would say..90% is done. 1 or max. 2 weeks until release.1 point
-
RunWait(@ComSpec...
zxtnt09 reacted to Tripredacus for a topic
How come you use BinaryToString in the Msgbox but not the RunWait?1 point -
He's telling you that you should edit your posts rather than repeatedly posting updates. BTW, can you also please use code tags when posting code, it's very hard to follow the code without.1 point
-
May I draw your attention to the edit button. It's inexplicably hard to see, but on the same line as Quote button and becomes highlighted on mouseover post.1 point
-
Can you post website with that code in it?1 point
-
RunWait(@ComSpec...
zxtnt09 reacted to JLogan3o13 for a topic
This: RunWait(@ComSpec & ' /c ' & 'netsh advfirewall firewall add rule name="test" dir=in action=allow remoteip=$var) Should be this: RunWait(@ComSpec & ' /c ' & 'netsh advfirewall firewall add rule name="test" dir=in action=allow remoteip=' & $var)1 point -
This is fixed in the latest beta.1 point
-
This works for me: <snip>1 point
-
StringSplit Error how to pass
allcapone1912 reacted to water for a topic
The help file is your friend On success StringSplit returns an array with element 0 set to the number of elements. Else @error is set to 1.1 point -
ControlMove is moving the wrong thing.
AquamarineGom reacted to gottygolly for a topic
Any thoughts on why it is moving the wrong button? Func _Test($xCord,$yCord,$Width,$Height) GUICtrlCreateButton("",$xCord,$yCord,$Width,$Height) EndFunc $gui = GUICreate("",300,300,-1,-1) Opt("GUIOnEventMode",1) $Test = _Test(50,50,100,20) $Button = GUICtrlCreateButton("Button",0,0,100,20) GUISetOnEvent(-3,"_Exit") GUICtrlSetOnEvent($Button,"Button") GUISetState() While 1 Sleep(10) WEnd Func _Exit() Exit EndFunc Func Button() $cp = ControlGetPos($gui,"",$Test) ControlMove($gui,"",$Test,$cp[0]+10,$cp[1]+10) EndFunc1 point -
Newer systems have nicer looking "Browse for folder" UI than older does. AutoIt internally calls older version. Since some time AutoIt can natively access, by definition early bound objects, using special technique of late binding. Function that does this is ObjCreateInterface(). Considering most of the Windows is COM based the advantages are big, you just have to learn how to take them. This small example (attached FileSelectFolder.au3) shows how to create object of IFileDialog interface and by calling its methods customize and invoke "select folder" dialog. In case of older systems where IFileDialog isn't available the function will call internal AutoIt's FileSelectFolder(), so it should be safe to use in any environment. Example of usage is from the help file for normal dialog: #include "FileSelectFolder.au3" Local Const $sMessage = "Select a folder" ; Display an open dialog to select a folder. Local $sFileSelectFolder = FileSelectFolder2($sMessage, "") If @error Then MsgBox(4096, "", "No folder was selected.") Else MsgBox(4096, "", "You chose the following folder:" & @CRLF & $sFileSelectFolder) EndIf ...And the UDF: FileSelectFolder.au31 point