Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/08/2021 in all areas

  1. Jos

    using dll in c#

    @MASKED, Ok, I can only come to the conclusion you are really not that smart when you consider it to be a bright idea reporting both @Melba23 and me for locking your threads. You are banned.
    3 points
  2. c.haslam, Alas, "FileOpenDialog" is the Microsoft name for that dialog, so that is what the AutoIt function is called. I sympathise with your plea, but best take it up with Bill Gates, not us! M23
    1 point
  3. Simply pass a parameter to the au3 script. Read it with CmdLine array.
    1 point
  4. c.haslam, Where in the Help file page for FileOpenDialog does it even mention opening files? It specifically says: which is all that it does (other than change @WorkingDir if successful and which is also quite clearly mentioned). Do you expect us to say what it does NOT do as well? I mean it does not delete the files, nor change their attributes, nor move them up one level in the directory tree, etc, etc. What it does do is tell you the file(s) selected - which is, as shown above, specifically mentioned. M23
    1 point
  5. Hey frank10, those are unfortunately limitations of the AutoIt Parser, as far as I understand. I guess you have no chance, but to use a temporary variable. Regarding the direct access of Array-Elements for writing, there is a potential workaround, which is still not pretty. We could "fake" a method for all the Array data. This would be done by replacing your AutoItSharedData.au3 with the following file (for testing purposes:) Instead of ;~ $oShare.arr[1] = 5 ; NO you could then write: $oShare.arr(1) = 5 Not great, but at least something.
    1 point
  6. * Use the second snippet * exchange "SciTE.exe" with your ProgramName.exe If "SciTE.exe" = $sPN Then ContinueLoop Edit: Use ProcessClose($iPID) instead of WinClose($aVar[$i][0]) So the closing of everything will go much faster
    1 point
  7. rony2006, The $hWndFrom and $hIDFrom parameters allow you to distinguish between the 2 ListViews. Just use a Switch structure to separate the different sections of the handler. M23
    1 point
  8. Parameters of Control* are case-sensitive.
    1 point
  9. @CYCho : glad we could help, now your script works fine on my computer too Nine is always creative and brings up ideas & working solutions, so it's a pleasure to join the party and share some ideas. Thanks to his EX !
    1 point
  10. @NassauSky Rather than modify the InnerHTML, have you tried something like this? _WD_ExecuteScript($sSession, "document.body.style.MozTransform='scale(4)';")
    1 point
  11. because WinList also captures the "Program Manager" windows, ie Windows itself, which, by closing itself, is equivalent to exiting Windows; so if you want to avoid it, as already suggested by @Nine, you have to exclude that window from WinKill (), as for example shown in line 8 (now commented by semicolon) This modified script shows, harmlessly, what would be "death row" windows #include <array.au3> Local $var = WinList(), $aVisible[0][2] For $i = 1 To $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" And IsVisible($var[$i][1]) Then _ArrayAdd($aVisible, $var[$i][0] & '|' & $var[$i][1]) ; if $var[$i][0] <> "Program Manager" then WinKill($var[$i][1]) EndIf Next _ArrayDisplay($aVisible, "Windows to be killed") Func IsVisible($handle) If BitAND(WinGetState($handle), 2) Then Return 1 Else Return 0 EndIf EndFunc ;==>IsVisible
    1 point
  12. Hi everyone, I have been busy with taxes so I have not done much coding work recently, it is currently the last month of the financial year in India (and in many countries around the world), so I need to go through accounting and do my taxes, fun stuff... NOT In the meanwhile, I thought I could do some research and interact with you guys on the new forum, so I created a topic about "Non-Windows Experiences" where you guys can share your experience with Non-Windows systems, this project is about getting freedom from Windows after all! Do check it out and reply if you would like to participate in the discussion. Oh, and you can also use Discord, Google, GitHub etc. to login into the forum without having to manually create an account! In any case, for those who are not aware, I am planning to post short and frequent updates on the dedicated forum, see my previous posts for more info. I'll keep you guys updated, hopefully we will have a major update soon once I do my taxes.
    1 point
  13. From the FileExists help file entry -- Good discussion here --
    1 point
  14. Hello i have searched a lot about how to run external programs with the administrator privileges without the script running with administrator privileges using autoit But all my attempts failed Finally, today I found the VBS function doing this task I immediately transferred it to our beloved language (autoit) and i decided to share it with you i hope you like it This is a simple example about how to use the function runAsAdmin("cmd.exe", "/c @echo off & cls & echo test & pause", "c:\", @sw_show) this is the function func runAsAdmin($program, $parameters = "", $workingDir = @workingDir, $show = "") local $oShell = OBJCreate("Shell.Application") if isOBJ($oShell) then local $result = $oShell.ShellExecute($program, $parameters, $workingDir, "runas", $show) else $result = false endIf return $result endFunc
    1 point
  15. ShellExecute("notepad.exe", "", "", "runas")
    1 point
  16. @SystemDir stores the 32 bits path with a script running in 32 bits. In a x64 Windows, a 32 bits application maps the system32 directory to c:\windows\syswow64 (it's the WOW6432 redirection). So when the application accesses to c:\windows\system32, it accesses to the c:\windows\syswow64 folder. You can enable or disable the WOW6432 redirection using _WinAPI_Wow64EnableWow64FsRedirection(True/False). But don't use @SystemDir, because it always returns the Syswow64 path (with a 32 bits running script). You can use _WinAPI_ShellGetKnownFolderPath($FOLDERID_System) instead #include <WinAPIFiles.au3> #include <WinAPIShellEx.au3> _WinAPI_Wow64EnableWow64FsRedirection(False) Local $sSystem32 = _WinAPI_ShellGetKnownFolderPath($FOLDERID_System) If FileExists($sSystem32 & "\dsac.exe") Then MsgBox("","","the file exists! and we are happy :)") Else MsgBox("","","please download microsoft remote administration tools",3) ShellExecute("https://www.microsoft.com/en-us/download/details.aspx?id=45520") EndIf Another way, is the use the Sysnative folder. In this case, you don't need to disable the WOW6432 redirection : Local $sSystem32 = FileExists(@WindowsDir & "\sysnative") ? @WindowsDir & "\sysnative" : @SystemDir If FileExists($sSystem32 & "\dsac.exe") Then MsgBox("","","the file exists! and we are happy :)") Else MsgBox("","","please download microsoft remote administration tools",3) ShellExecute("https://www.microsoft.com/en-us/download/details.aspx?id=45520") EndIf
    1 point
  17. maybe this will help you If Not IsAdmin() Then ShellExecute(@AutoItExe, "", "", "runas") ProcessClose(@AutoItPID) Exit Else MsgBox(64, "1", "IsAdmin() = " & IsAdmin()) RunWait(@WindowsDir & "\regedit.exe", @WindowsDir, @SW_MAXIMIZE) EndIf MsgBox(64, "2", "IsAdmin() = " & IsAdmin() & @LF & $CmdLineRaw) ; ShellExecute(@AutoItExe, "ect ect ect", "", "runas") RunWait(@WindowsDir & "\regedit.exe", @WindowsDir, @SW_MAXIMIZE) Ciao.
    1 point
  18. I want to help you , But it's hard for me. OneNote works fine, which has been my major note taking app for years. I prefer handwritten notes to typing, so I connected my XP-Pen digital tablet to my laptop to use with OneNote.
    0 points
×
×
  • Create New...