
dunk6
Members-
Posts
18 -
Joined
-
Last visited
Everything posted by dunk6
-
I found this method in VBA,InvokeVerbEx("name") which will select from the context menu. It open my program window, doing the prog execution, but if during it running, i cannot move away from it windows or the execution did not work. someone tell me how to fix this, thanks!! $objShell = ObjCreate("Shell.Application") $objFolder = $objShell.Namespace($source) $colItems = $objFolder.Items For $i = 0 to $colItems.Count - 1 ;doing right click here $colItems.Item($i).InvokeVerbEx("Encrypt") Sleep(500) ;send password ControlSend("SafeNet ProtectPack", "", "Edit2", $pass) Sleep(500) ;confirm password ControlSend("SafeNet ProtectPack", "", "Edit3", $pass) Sleep(500) ;execute program Send("{ENTER}") Sleep(500) Send("{ENTER}") Next and sometimes doing problem like here: http://www.autoitscript.com/forum/index.php?showtopic=103325&view=findpost&p=734220
-
How to select the first file in a folder
dunk6 replied to dunk6's topic in AutoIt General Help and Support
Hi..could not find anyhtg reagarding filegetlist command in AutoIt/vba. is it the write name? I can select the file and apply some process on it, but got problem, eg, after sometime, the moveFiles function is not execute. Can i forced the FileMove() no matter conditions are? can tell me wat's wrong n way to fix it? Func Encrypt() $objShell = ObjCreate("Shell.Application") $objFolder = $objShell.Namespace($source) $colItems = $objFolder.Items For $i = 0 to $colItems.Count - 1 $colItems.Item($i).InvokeVerbEx("Encrypt") Sleep(500) ;send password ControlSend("xxxx", "", "Edit2", $pass) Sleep(500) ;confirm password ControlSend("xxxx", "", "Edit3", $pass) Sleep(500) ;execute program Send("{ENTER}") Sleep(500) Send("{ENTER}") Next Sleep(500) FileMove( $source &"*.pac" , $dest,1) endFunc -
How to select the first file in a folder
dunk6 replied to dunk6's topic in AutoIt General Help and Support
Thank for idea, Jz wannna know, is there a function like 'for each..' in the AutoIt? Ahh.. very sorry, i though it was the same. I'll keep that in mind . thanks I'm not using any sorting method for the folder. it just a folder and inside there contain a file. '1st file', i'm referring to he beginning of the first file inside that folder. sorry, i dont know how to explain in correct terms. I'll try go tru with filegetlist command first!. thanks all -
the error fix, but new problem arised. Sorry really nd ur guyz help again. What i want the program do: 1) read source, destination, folder path and password from textfile 2) function execute() -> select from context menu and do some execution and new file *.pac will created. 3) function moveToDest() ->once execution finish, move all *.pac files to destination folder. ERROR here: after finish no.2, the operation stop and cause this error remote server has been paused or is in the process of been startup. runtime error: permission is denied. What does it mean. How to fix this? ... Call Execute() oAutoIt.Sleep(1000) Call moveToDest() //ERROR HERE, AFTER FINISH CALL Encrypt(), IT SEEMS IT CANNOT INVOKE THIS FUNCTION 'Encrypt the content in the source folder Sub Execute() Dim objShell: Set objShell = CreateObject("Shell.Application") Dim objFolder : Set objFolder = objShell.Namespace(source) Dim colItems: Set colItems = objFolder.Items Dim i For i = 0 to colItems.Count - 1 colItems.Item(i).InvokeVerbEx("Encrypt") oAutoIt.Sleep(500) oAutoIt.Send("!w") oAutoIt.Send("{TAB}") oAutoIt.Send(pass) oAutoIt.Send("{TAB}") oAutoIt.Send(pass) oAutoIt.Send("{ENTER}") 'oAutoIt.Sleep(500) Next End Sub 'Once the file being executed, move the file to destination folder 'move the .pac into dest folder Sub moveToDest() dim newfolder Dim objFSO: Set objFSO = CreateObject("Scripting.FileSystemObject") If Not filesys.FolderExists(dir) Then newfolder = objFSO.CreateFolder (dir) WScript.Echo "A new folder '" & newfolder & "' has been created" End If objFSO.MoveFile source & "*.pac" , dest End Sub WScript.Quit
-
Sorry for the confusion, when i go tru again, this code is called AutoItX.
-
I have this code running using VBsEdit TargetFolder = "C:\temp" Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(TargetFolder) Set colItems = objFolder.Items For i = 0 to colItems.Count - 1 colItems.Item(i).InvokeVerbEx("Open") Next When i try to run it using AutoIt, i do this: Option Explicit Dim oShell Dim oAutoIt Set oShell = WScript.CreateObject("WScript.Shell") Set oAutoIt = WScript.CreateObject("AutoItX3.Control") Dim TargetFolder set TargetFolder = "C:\Archive" ;//ERROR HERE Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(TargetFolder) Set colItems = objFolder.Items For i = 0 to colItems.Count - 1 colItems.Item(i).InvokeVerbEx("Open") Next WScript.Quit I receive error at TargetFolder = "C:\Archive" Can anybody tell me what i did wrong? thank you
-
Unfortunately, no key are applied for that program and yes, i understand bout ur concern on the context menu things, but i only see that is the only solution i have for now!
-
How to select the first file in a folder
dunk6 replied to dunk6's topic in AutoIt General Help and Support
Im sorry, still cannot figure out how to implement this. For example if i have a function call testFunc(), how should i make the first file invoke the function first, then the next file, and next2. testFunc() is trying to open context menu and select some shortcut. $StartDir = "C:\Archive\" $search = FileFindFirstFile($StartDir & "*.*") ; Check if the search was successful If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop testFunc() ;$file2 = FileOpen("test.txt", 1) ;FileWriteLine($file2, $file & @CRLF) ;FileClose($file2) WEnd ; Close the search handle FileClose($search) Func testFunc () MouseClick("menu") $count = 1 Do Send("{DOWN}") $count = $count + 1 Until $count > 7 Send("{ENTER}") EndFunc -
That's the problem,I dont knw wthr it have hotkeys built in. But I try to code like this, and it run the way i want, but is there simplest way to do??: ;on right click MouseClick("right") $count = 1 Do Send("{DOWN}") $count = $count + 1 Until $count > 7 Send("{ENTER}") thanks
-
I found this command: dllOpen("filename"). what is this function for? How it works? How to call? can be use in my case or not? When i try, this error appeared: "the application failed to start because cgxapi.dll was not found.Re-installing the application to fix the problem." What is the error means?
-
Hi, Using mouseCLick function, can i script something like this: From right click, select and open shortcut/action of the program in context menu. MouseClick("menu") thanks in advance
-
Hi all, How to check the first file in the folder and doing and doing zip to it? thanks
-
Sorry, nothing happened! i also try to inlcude it path Run ("C:\Program Files\Encryption\xxx.dll")
-
Hi all, can AutoIt run the program with .dll extension? I think my 3rd app using this extension. http://www.autoitscript.com/forum/index.php?showtopic=103265 thanks in advance!
-
Finding a program execution(.exe) location.
dunk6 replied to dunk6's topic in AutoIt General Help and Support
Thank you very much. that's answer my problems. thanks all!! But if in this case, can AutoIt automate program using dll extension instead of .exe? eg: Run("someProgram.exe") -
Finding a program execution(.exe) location.
dunk6 replied to dunk6's topic in AutoIt General Help and Support
i attach here the context menu list and the findings that i got. it seems that it, the name for the context menu didnot appeared here. even there are values that idont know what's that means thankz -
Finding a program execution(.exe) location.
dunk6 replied to dunk6's topic in AutoIt General Help and Support
right click on all kind of files and folders. Like winzip Thanks for the reply.. Found the location which i installed the program. But here only have 1 exe and the lots of dll files. The program mention is an encryption/decryption program, so it was suppose 2 exe right? Only have here is decrypt .exe not encrypt .exe. Is there a possibilities that the encypttion exe are done using these dlls? thank you! -
Hi all, i have a program which only running by right clicking. When we install it, it added into right click menu(not sure exact term to calls.) I want to write a code on automated on this program but i couldn't find it's execution file. i believe it must be ext ".exe" So my problem is how can i find the .exe location? thanks in advance.