Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. For #1 it is very easy. Just create a GUI with a combo-box and use GUICtrlSetData ($idCombo, $Users) to store the values into the combo For #2, can you run this, see if you get all users this way (show the result if you can) : #include <Constants.au3> Global $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") Local $Output = "Computer: " & @ComputerName & @CRLF $Output &= "==========================================" & @CRLF Local $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_UserAccount") If not IsObj($colItems) then Exit Msgbox(0,"WMI Output","No WMI Objects Found") For $objItem In $colItems $Output &= "Caption: " & $objItem.Caption & @CRLF Next MsgBox ($MB_SYSTEMMODAL,"",$Output)
  3. Hello Subz, thanks for your proposal. Yes this installs the Client, even removing the old versions from the system!! I only wonder, where did you find a reference to those parameters? Or did you simply derive them from MSI installers? Now I will continue to automate the settings for the user. Again thanks a lot! I hope I'm able to return some help into the forum at some point. PS: Sorry for the late answer. First i had a meeting and then i experimented a bit with your command line parameters.
  4. Not sure that this will work in your scenario, but have you tried checking the result of ControlGetFocus, both before and after the timeout?
  5. Today
  6. @Nine Yea, I can provide the entire script but having the 3rd party application called Fusion Dictate is different story.
  7. @seadoggie01 So this is where I'm not entirely sure which one is the bug, however, when it's idle for 30 minutes, I've closed down the Au3 script and then just manually enter or scan in the data to the 3rd party application "Case #" and it works as normal. But when I open up the script again, it still won't send the data or hit the enter key. The best method so far is to close down the 3rd party application and opening it up again for everything to work. As a possible workaround, I'm thinking of doing an idle time check and just sending a blank enter key to the Case # and if possible delete that Case to open up the "Case #" again. My idea below: Global $idleFlag = False While 1    If WinExists($fusionWindowTitle) and WinExists($fusionCaseNumWinTitle) Then       If $idleFlag == False Then          $idleTimeStart = TimerInit()          consoleWrite("IDLE TIME START: "& $idleTimeStart & @CRLF)          $idleFlag = True       Else         $fDiff = TimerDiff($idleTimeStart)         If $fDiff > '1500000' Then ; <== Greater than 25 minutes             WinActivate($fusionCaseNumWinTitle, "")             WinWaitActive($fusionCaseNumWinTitle)             Send("{ENTER}")             $idleFlag = False         EndIf       EndIf    EndIF WEnd
  8. Really hard to say without a script that replicates the problem. But my first reflex (and I might be completely wrong) would be to check credentials conflict between the script and the end-user. You say that shutting down the script and restarting it (with the current user) solves the issue. I would try to put #RequireAdmin at first, see if it is working.
  9. At that point, is it better to try restarting the "Case #" application? It might be the one not responding instead of AutoIt.
  10. @jhcd i will do tests with what you passed me, thanks.
  11. @Danp2 Thanks for the reply, everything runs fine when the system has not been idle for 30 minutes. But when it has been 30+ minutes, the "WinActivate("Case #")" i.e. WinActivate($fusionCaseNumWinTitle, "") works as I can see the handle being properly returned. However, the data will not be inputted nor will the "Enter" key be sent. I've tried hard coding in the "ControlID" after it's been idle for 30 minutes as well, but it still will not work. The code I've tried: ControlSetText("Case #","", "[ID:2362094]", $caseTxt) Send("{ENTER}") I've also tried giving the ControlSetText the handle, but none of these work for the 30-minute idle issue. $hwnd = WinActivate("Case #", "") ControlSetText($hwnd,"", "[ID:2362094]", $caseTxt) Send("{ENTER}") Here is the current Control ID of the field in question. One thing to note is that the "Case #" windows will open and close depending on the end-user as they perform a task. This produces a new Control ID each time a "Case #" window appears and since I didn't have a reliable way to get that control ID, I used the ( TEXT = "" ) which I found from the AutoIt Window Info above. This is always consistent rather than CLASS or CLASSNN which can also change when the 3rd party application is loaded for each end-user. Hence the code below: ControlSetText("Case #","", "", $data) My reasoning for this was from the AutoIT Help documentation listed under "Controls" says TEXT is an option to use. I've tried also to use the "CLASSNN" as well, but yet again on when the application has been idle for 30 minutes it will not send the data or hit enter. $hwnd = WinActivate("Case #", "") ControlSetText($hwnd,"", "[CLASSNN:WindowsForms10.Window.8.app.0.33c0d9d1]", $caseTxt) Send("{ENTER}")
  12. Hi, i have a source code of "Danny35d" and i have 2 main question that are: How to extract this function's results (Datas are as Array) to combo-box without set number of datas? When i type 1, 2 in _SystemUsers($AccountType = 0) to get only Local or Domain users, it just give me both of them, it's old problem of this function, please share us debugged code :)❤ #include <Array.au3> $Users = _ArrayToString(_SystemUsers(), "|", 1) ConsoleWrite($Users & @CRLF) #cs =============================================================================== Function: _SystemUsers($AccountType = 0) Description: Return an array with the local or domain username Parameter(s): $AccountType: Local, domain or both username 0 = Local and Domain usernames 1 = Local usernames only 2 = Domain usernames only Returns: An array with the list of usernames - Succeeded @error 1 - Didn't query any username @error 2 - Failed to create Win32_SystemUsers object @error 3 - Invalid $AccountType Author(s): Danny35d #ce =============================================================================== Func _SystemUsers($AccountType = 0) Local $aSystemUsers Local $wbemFlagReturnImmediately = 0x10, $wbemFlagForwardOnly = 0x20 Local $colItems = "", $strComputer = "localhost" If Not StringRegExp($AccountType, '[012]') Then Return SetError(3, 3, '') $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_SystemUsers", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems $Output = StringSplit($objItem.PartComponent, ',') If IsArray($Output) Then $Temp = StringReplace(StringTrimLeft($Output[2], StringInStr($Output[2], '=', 0, -1)), '"', '') If $AccountType = 0 Or ($AccountType = 1 And @ComputerName = $Temp) Then $aSystemUsers &= StringReplace(StringTrimLeft($Output[1], StringInStr($Output[1], '=', 0, -1)), '"', '') & '|' ElseIf $AccountType = 2 And @ComputerName <> $Temp Then $aSystemUsers &= StringReplace(StringTrimLeft($Output[1], StringInStr($Output[1], '=', 0, -1)), '"', '') & '|' EndIf EndIf Next $aSystemUsers = StringTrimRight($aSystemUsers, 1) If $aSystemUsers = '' Then Return(SetError(1, 1, $aSystemUsers)) Return(SetError(0, 0, StringSplit($aSystemUsers, '|'))) Else $aSystemUsers = '' Return(SetError(2, 2, $aSystemUsers)) EndIf EndFunc ;==>_SystemUsers Thanks to your best Team.
  13. Why not just read the UDF and save it as ASCII?
  14. I would really like to be able to continue using version because it is the last one that still obfuscates the script after compiled, I know that this does not solve for those with advanced knowledge but it keeps away curious people who decompile scripts, any other way to save the bank of data I have in memory for the hard drive would be welcome but I cannot change the version I use Autoit to do this.
  15. You should upgrade to the latest AutoIt version! You can as well do what you say by dropping the DB table and recreating it from the memory table.
  16. Both Microsoft.XMLDOM and Msxml2.DOMDocument will use the default xml parser on your system, so effectively the same. Use the xml udf by mLipok and more specifically _XML_Tidy to create the indents.
  17. What does $aArray[3] contain? Is it a random port or is it the one you set on UDPOpen? https://www.autoitscript.com/autoit3/docs/functions/UDPOpen.htm Here's a simple script to view the array... #include 'array.au3' UDPStartup() Local $iPort = 2065 Local $sIPAddress = '' Local $aUDPInfo = UDPOpen($sIPAddress, $iPort) _ArrayDisplay($aUDPInfo) UDPShutdown() BTW, there's an error in the example script on the MyUDP_Client() function. Local $iSocket = UDPOpen($sIPAddress, $iPort) Local $iError = 0 ;<----
  18. I was unable to change to UTF8 + BOM in version of Autoit that I use, there is no simpler way to just save the database that is in memory to the hard drive after having made all the changes to this file that is being executed in the memory?
  19. Hi all, I'm writing a new script for reading/writing xml file. first question: I found different example and I see different ways: ObjCreate("Msxml2.DOMDocument") and ObjCreate("Microsoft.XMLDOM") ? which is the best? second question: $oNodeFile = $oXmlLog.createElement("File") $oNodeRoot.appendChild($oNodeFile) this is working but the output is written in one line (I'm using notepad++) <ROOT><NODE><SUBNODE/></NODE></ROOT> instead of <ROOT> <NODE> <SUBNODE/> </NODE> </ROOT> how can I format the xml in order to see the node indent? Thanks in advance
  20. I have an idea for a website, as I want to make myself a tool but also put it on the web to let others use it but am very new to development and have been teaching myself basic code, mainly python through youtube videos. I am not really sure which is the best coding language to learn to achieve what I want to do? How would I go about making something interactive like this tax calulator but much more thorough, so it can include budgeting, expenditure, and every aspect of a persons finances in a simple tool like this? Any pointers are appreciated, thank you
  21. Strange. Just save the file as UTF8 + BOM then.
  22. I had already tried this but I get error messages when I run SQLitebackupTest
  23. But that is exactly what you did here. You start by opening the command prompt hidden, run the command, and wait for it to request the password before putting it in. However, I imagine that this would be secure enough for protecting your personal files/code... mostly because the files on your flash drive are password protected, so someone would need to get your flash drive, access your work computer, find the command history, and extract the password before extracting your personal files. You might need to overwrite the $hs variable... I'm no security expert, however, so take that with a grain of salt (or a shaker). I don't know if the string would need to be the same size to completely overwrite the data either. Someone else might be able to better help you with that. As for tips on improving your code, I would suggest putting this in a function and explicitly declaring your variables. You might also consider looking for a UDF for 7Zip, as they are likely to cover a few more edge cases (like where you check the $Data_Out), but with your advanced command line options, that might not be possible.
  24. OK, then you can just use the backup function back and forth.
  25. Have you tried just running #RequireAdmin RunWait(@ScriptDir & "\Nextcloud-2.6.2-setup.exe /S /norestart", "", @SW_HIDE)
  26. Oh i've forgotten to mention a few points: SciTE V 4.2.0 AutoIt V Nextcloud Installer V 2.6.2
  1. Load more activity
  • Create New...