Jump to content

Search the Community

Showing results for tags 'open'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 12 results

  1. Hi All, Trying to open windows explorer to a WebDav location and it's not working quite how I want, on the computers it is setup as a "network location" (as opposed to a "mapped drive", and this unfortunately can't be changed), the "Data" WebDav folder sits directly under "This PC" if that's an easier way to get to it. any suggestions as to what I can correct to get the 2nd example to work? ; This works, but I'm trying to avoid this as users normally see the URL style in the 2nd example below $folderToOpen = "\\mycompany.sharepoint.com@SSL\DavWWWRoot\Data" Run("Explorer.exe " & $folderToOpen) ; This does not work, it tries to open the WebDav url in the default web browser $folderToOpen = "https://mycompany.sharepoint.com/Data" Run("Explorer.exe " & $folderToOpen) ShellExecute also opens it in the default browser. Saw _WinAPI_ShellOpenFolderAndSelectItems but couldn't get the 2nd example to work. If I manually open Windows Explorer and paste in https://mycompany.sharepoint.com/Data it loads the WebDav directory without issue. If I have to use the pathing from the first example it is fine, just trying to give users a familiar experience. Thanks!
  2. I want to write a script to toggle the opening and closing of a pdf file. For example if i have a flie called myFile.pdf I want the script to open/load it. However if myFile.pdf is open then i want the same script to close it. Could someone please tell me how I can know if the pdf file is open/loaded? Thank you Simon
  3. Version 1.0.0

    535 downloads

    Events-based UDF to help on handling one or more TCP connections
  4. Hi guys! I'm having a trouble with TCPAccept() on compiled scripts. This script I made to test: #include <Debug.au3> _DebugSetup() TCPStartup() $Main = TCPListen("0.0.0.0", 8081) _DebugOut("TCPListen output: " & $Main) While True $ac = TCPAccept($Main) _DebugOut("TCPAccept return: " & $ac) If $ac <> -1 Then _DebugOut("There's someone out here!") TCPSend($ac, "hi") EndIf WEndWorks fine if I run it by pressing F5 on SciTe window. But if I compile it and then execute the executable file, it does not work. Instead, NetCat tells me that the connection timed out (I've tested other clients as well): I've checked if the port is really opened, if I really can open it, if there is other software using that port, but everything showed that it should connect. Btw, netstat -an shows that the port is really listening (when I execute my file). It listens, but does not accept. I use no antivirus software (I use this Windows installation for coding only) and Windows Firewall is disabled. I've tried, anyway, allowing my exe file on Firewall rules, but it also did not work. Running as administrator also did not help. I believe it's a Windows (Firewall?) bug rather than an AutoIt bug. How can I manage to solve this? Thanks in advance.
  5. Hi, This code intented to do all the combinations of 2 digit numbers but has to be stoped anytime and must return at the point it stopped before. I thought of saving the vector`s index and passed it again when the code restarted. I was succesful in writing the vector`s index in a FileOpne.txt archive but did not manage to read it and pass the index to the $aArrayComb vector. Does anybody could help me with that ? #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.12.0 #ce ---------------------------------------------------------------------------- #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <Array.au3> #include <Misc.au3> $aArrayComb = '0123456789' $aArrayComb = StringSplit($aArrayComb, "") Local Const $sFilePath = "C:\FileOpen.txt" ; Abrir O Arquivo Local $hFileOpen = FileOpen($sFilePath, $FO_READ + $FO_OVERWRITE) If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "There is not a previous point break.") EndIf HotKeySet("{ESC}", "Terminate") $chave = "" For $1 = 1 To $aArrayComb[0] For $2 = 1 To $aArrayComb[0] For $3 = 1 To $aArrayComb[0] $chave &= "Combination : " & $aArrayComb[$1] & $aArrayComb[$2] & $aArrayComb[$3] & " Position : " & $1 & $2 & $3 & @CRLF Consolewrite($chave & @crlf) Next Next Next Func Terminate() $pos = $1 & $2 & $3 FileWrite("C:\FileOpen.txt", $pos) Exit EndFunc
  6. Hello, i was wondering how i would go about opening a random URL from a predefined list? i am trying to create a small game for the kids, where they have a question and they have to find out the answer (finish the story) from the pages that open...but i need all the pages to be at random, so they need to work out which part comes first, second, third...etc. the code i use to open the URL is and to close the browser: shellexecute("THE URL") If ProcessExists("firefox.exe") Then ProcessClose("firefox.exe") endif is it possible to creaet like a shellexecute("$random") and then add my url's as a ranodm variables? or would it be better to add each script with URL / porcessclose and randomly pick which "url" to open? all help much appreciated MrYonG
  7. I can open an Internet Explorer Window without a toolbar with this: #include <IE.au3> $ie = _IECreate('www.example.com', 0, 0, 0) _IEPropertySet($ie, "toolbar", False) $IE.Visible = 1 I can open a Google Chrome Window with a toolbar with this: ShellExecute("chrome.exe", "www.example.com","","") The question is, how can I create a Google Chrome Window without a toolbar?
  8. I know this has been asked before, but finding it, is a different case all together. Even searched google.com and was able to see the a properties window that had a radio button, but could not find in Scite the option. Can someone tell me where to change the default behavior of Scite to open or edit the au3 files? http://www.autoitscript.com/autoit3/scite/docs/SciTEConfig.html - where is the window they are showing located in scite? I fell dumb
  9. Credits go to the authors of AutoIt Unlocker! #NoTrayIcon #include "WinAPIEx.au3" #include <WinAPI.au3> Dim $hTimer = TimerInit() Dim $aFiles = _ProcessListFiles("firefox.exe") ; Get a list of files currently opened by the process ConsoleWrite("+>Took " & Round(TimerDiff($hTimer)) & " milliseconds" & @CRLF) #include <Array.au3> _ArrayDisplay($aFiles) Exit Func _ProcessListFiles($vProcess, $nMaxFiles = 1000) Static Local $aPrivilege = DllCall("ntdll.dll", "int", "RtlAdjustPrivilege", "int", 20, "int", 1, "int", 0, "int*", 0) Local $nProcessId = ProcessExists($vProcess), $aRet Static Local $hCurrentProcess = _WinAPI_GetCurrentProcess() Local $aHandles = _WinAPI_EnumProcessHandles($nProcessId) Local $hObject, $aFiles[$nMaxFiles+1], $sPath Local $hProcess = _WinAPI_OpenProcess(0x0040, 0, $nProcessId, True) For $i = 1 To $aHandles[0][0] Step 1 If $aHandles[$i][3] = 0x00120189 Or $aHandles[$i][3] = 0x0012019f Or $aHandles[$i][3] = 0x00100000 Then ContinueLoop $hObject = _WinAPI_DuplicateHandle($hProcess, $aHandles[$i][0], $hCurrentProcess, 0, False, $DUPLICATE_SAME_ACCESS) If Not $hObject Then ContinueLoop If __IsFileObject($hObject) Then $sPath = __FileObjectPath($hObject) _WinAPI_CloseHandle($hObject) If FileExists($sPath) Then For $n = 1 To $aFiles[0] If $aFiles[$n] = $sPath Then $sPath = 0 ExitLoop EndIf Next If $sPath Then $aFiles[0] += 1 $aFiles[$aFiles[0]] = $sPath If $aFiles[0] >= $nMaxFiles Then ExitLoop EndIf EndIf EndIf Next ReDim $aFiles[$aFiles[0]+1] Return $aFiles EndFunc Func __IsFileObject(ByRef $hObject) Static Local $tPOTI = DllStructCreate('ushort;ushort;ptr;byte[128]'), $pData, $Length, $tString Local $aRet = DllCall("ntdll.dll", 'uint', 'NtQueryObject', 'ptr', $hObject, 'uint', 2, 'ptr', DllStructGetPtr($tPOTI), 'ulong', DllStructGetSize($tPOTI), 'ptr', 0) If @error Or $aRet[0] Then Return $pData = DllStructGetData($tPOTI, 3) If Not $pData Then Return $Length = DllCall("kernel32.dll", 'int', 'lstrlenW', 'ptr', $pData) If @error Or Not $Length[0] Then Return $Length = $Length[0] $tString = DllStructCreate('wchar[' & ($Length + 1) & ']', $pData) If @error Then Return Return (DllStructGetData($tString, 1) == "File") EndFunc Func __FileObjectPath($hObject) Static Local $tStruct = DllStructCreate("char[255];") Local $aDrive = DriveGetDrive("ALL"), $sPath Local $aDrivesInfo[UBound($aDrive) - 1][2] For $I = 0 To UBound($aDrivesInfo) - 1 $aDrivesInfo[$I][0] = $aDrive[$I + 1] DllCall("kernel32.dll", "dword", "QueryDosDevice", "str", $aDrivesInfo[$I][0], "ptr", DllStructGetPtr($tStruct), "dword", 255) $aDrivesInfo[$I][1] = DllStructGetData($tStruct, 1) Next Local Static $tPOTI = DllStructCreate("ushort Length;ushort MaximumLength;ptr Buffer;wchar Reserved[260];"), $sDeviceStr, $vSolid = False DllCall("ntdll.dll", "ulong", "NtQueryObject", "ptr", $hObject, "int", 1, "ptr", DllStructGetPtr($tPOTI), "ulong", DllStructGetSize($tPOTI), "ulong*", "") $sDeviceStr = DllStructGetData(DllStructCreate("wchar[" & Ceiling(DllStructGetData($tPOTI, "Length") / 2) & "];", DllStructGetData($tPOTI, "buffer")), 1) For $y = 0 To UBound($aDrivesInfo) - 1 If StringLeft($sDeviceStr, StringLen($aDrivesInfo[$y][1])) = $aDrivesInfo[$y][1] Then $sPath = StringUpper($aDrivesInfo[$y][0]) & StringTrimLeft($sDeviceStr, StringLen($aDrivesInfo[$y][1])) EndIf Next Return $sPath EndFunc Anonymous
  10. Hello I need to open with autoit a MS access database! This database is opening with this shortcut: "C:\Program Files (x86)\Microsoft Office\OFFICE11\MSACCESS.EXE" /wrkgrp \\server\folder\sys.mdw \\server\folder\database.mdb /user MyUser /pwd MyPass How do I open this in Autoit. (using COM object) $adoCon = ObjCreate("ADODB.Connection") $adoCon.Open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & $dbname&"; SystemDB="&$wkname&"; " , $user, $pwd) If Not(IsObj($adoCon)) Then MsgBox(0,"error","error") Exit EndIf ; create recordset $adoRs = ObjCreate("ADODB.Recordset") $adoRs.CursorType = 1 $adoRs.LockType = 3 $sQuery = 'SELECT * FROM Address;' ; open query $adoRs.Open($sQuery, $adoCon) ... I got an error with the Query ! Need help Thanks in advance ! Cramaboule
  11. I have spent the past couple of days searching for the answer to this question, and I have not found one that really works. What I am trying to do, is have the following code always run and when ever notepad is open and idle for more then 2 seconds close it. It works but only when their is one instance of Notepad, if there are more then one it does not close all of them at the same time. Can someone help me, using this code, to have all windows with the title Notepad close? #include <Timers.au3> ;Declare the Timer: ; Global $TIMER = TimerInit() Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) HotKeySet("#{F4}", "_exit") ; Ctrl-Shift-Alt-X to exit While 1 ;If this application is active then reset the timer: If WinExists("Notepad") And _Timer_GetIdleTime() >= 2 * 1000 Then MsgBox (0, "Time reached", "You have been idle for more than 2 seconds.") WinClose("Notepad") EndIf ;Sleep for 1 seconds before looping again: ; Sleep(1000) WEnd Func _exit() Exit EndFunc Thanks Grimm
  12. Hi everyone ! I have a 1 question : " How can I open hosts file in windows with autoit code ? ". I tried by some other program but failed ! Help me plz ! Thank you !
×
×
  • Create New...