Jump to content

Miloud

Active Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by Miloud

  1. ConsoleWrite(_getDOSOutput('ffmpeg -version', 'G:\ffmpeg\bin\') & @CRLF) Func _getDOSOutput($command , $wd='') Local $text = '', $Pid = Run('"' & @ComSpec & '" /c ' & $command, $wd, @SW_HIDE, 2 + 4) While 1 $text &= StdoutRead($Pid, False, False) If @error Then ExitLoop Sleep(10) WEnd Return StringStripWS($text, 7) EndFunc ;==>_getDOSOutput https://stackoverflow.com/a/16581169/6228030
  2. The internet said that shellExecute() is suitable than run() when parameters are needed. This doesn't work either: Local $iRc = Run ( '"G:\ffmpeg\bin\ffmpeg.exe" "-version"' , "G:\ffmpeg\bin\") ;Local $iRc = Run ( '"G:\ffmpeg\bin\ffmpeg.exe" -version' , "G:\ffmpeg\bin\") ;Local $iRc = Run ( 'G:\ffmpeg\bin\ffmpeg.exe -version' , "G:\ffmpeg\bin\") ProcessWaitClose($iRc) $Message = StdoutRead($iRc) I need to get output from ffmpeg and determine wether commands finished execution!
  3. I suggest that you use _Crypt_HashFile
  4. In your function, you wrote WinActivated ... WinActivate works fine on my x64. Try this: opt("WinTitleMatchMode",2) WinActivate ( "[TITLE:كتب الشاملة]" ,"" ) ;كتب الشاملة is only a subscript of the full title!
  5. How to get the result of the command? My code : Local $iRc = ShellExecute ( "G:\ffmpeg\bin\ffmpeg.exe" , "-version" , "G:\ffmpeg\bin\") ProcessWaitClose($iRc) $Message = StdoutRead($iRc)
  6. Thank to: https://commandwindows.com/assoc.htm The solution is to add " %1" to the 5th line of the association script: FileExtAssoc("tcr0", "C:\Users\HP\Desktop\crypt\cryptIt.exe") Func FileExtAssoc($sExt, $sApplication) RunWait(@COMSPEC & " /c ASSOC ." & $sExt & "=ExTest", "", @SW_HIDE) RunWait(@COMSPEC & " /c FTYPE ExTest=" & $sApplication & ' "%1"', "", @SW_HIDE) MsgBox(0,"File Extension Application Association",'"' & $sExt & '"is now asscoiated with "' & $sApplication & '"',3) EndFunc
  7. I appreciate your help... The discussion on that page is far beyond my level...
  8. I imagine that your full-of-functions script looks like this: Func func1() ;.... EndFunc Func func2() ;.... EndFunc Func func3() ;.... EndFunc Here is my suggestion: 1- copy your script to msWord 2- run command replace by pressing ctrl+h 3- write on find "endfunc^p^pfunc" and in replace "endfunc^pfunc" and run it several times. 4- write on find "endfunc^pfunc" and in replace "endfunc^p|^pfunc" notice that the script should look like this: Func func1() ;.... Endfunc | func func2() ;.... Endfunc | func func3() ;.... EndFunc 5- save it as "myFunctions.txt" 6- after building the gui as suggested by Melba23 , make a command to open "myFunctions.txt", split its contents with "|", and write the needed functions on an external file with autoit extension then run it. You should consider that some of your functions require #include write an array of them.
  9. Hi, I have associated a file extension "tcr" with my application using this script which I found on stackOverFlow FileExtAssoc("tcr", "C:\Users\HP\Desktop\crypt\cryptIt.exe") func FileExtAssoc($sExt, $sApplication) RunWait(@COMSPEC & " /c ASSOC ." & $sExt & "=ExTest", "", @SW_HIDE) RunWait(@COMSPEC & " /c FTYPE ExTest=" & $sApplication , "", @SW_HIDE) MsgBox(0,"File Extension Application Association",'"' & $sExt & '"is now asscoiated with "' & $sApplication & '"',3) EndFunc on my application: #include <Array.au3> #include <WinAPIShPath.au3> ; An alternative to the limitation of $CmdLine[] only being able to return a maximum of 63 parameters. Local $aCmdLine = _WinAPI_CommandLineToArgv($CmdLineRaw) _ArrayDisplay($aCmdLine) $t="" For $i=1 To $CmdLine[0] $t &=$CmdLine[$i] &@CRLF Next ClipPut($t) I want to get the path after running "myfile.tcr". Using the above script, it's possible if I drag the mouse over the file "myfile.tcr" and drop it on my my application... I want that to happen when I double click. Any suggestions please!
  10. wow... I really appreciate your help... Thanks alot, it works now!
  11. Hello, the current udf isn't compatible with sciter.dll, though it opens the dll... Can you please provide a sciter.dll that is compatible with this udf! Will there be updates for this udf?
  12. Thanks @Alien4u, In fact I need it for a gui application which gets data from an sqlite table, what I needed was in fact the option 'copy ' I may (and sure shall) think as you said for the option 'get for word' which is needed too
  13. Thank you @AutoBert @Juvigy and @alien4u Here is approximately what I wanted : #include <_ClipPutHTML.au3> #include <Array.au3> $sPlainTextStr='1' & @TAB & '2' & @tab & '3' & @CRLF & '4' & @TAB & '5' & @TAB & '6' $sHTMLStr=toTable($sPlainTextStr) _ClipPutHTML($sHTMLStr,$sPlainTextStr) Func toTable($sPlainTextStr) $x=StringReplace($sPlainTextStr, @TAB, '</td><td>',0,2 ) $x=StringReplace($x, @CRLF, '</td></tr><tr><td>') $x='<table border="1"><tr><td>'&$x&'</td></tr></table>' ;MsgBox(0,0,$x) Return $x EndFunc Thanks to
  14. Hello, Can you plaease tell me how to ClipPut('1' & @TAB & '2' & @TAB & '3' & @CRLF & '4' & @TAB & '5' & @TAB & '6' ) to Appear in Ms Word like this
  15. Write this and see what happens While 1 @error=0 ;I think you may skip this line $sFileName = FileFindNextFile($hSearch) If @error Then ConsoleWrite("Error:"&@error); ExitLoop Else ConsoleWrite($sFileName) EndIf WEnd EndFunc
  16. try this: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <String.au3> #include <Array.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 238, 66, 192, 124) $Group1 = GUICtrlCreateGroup("", 6, 0, 225, 57) $Input1 = GUICtrlCreateInput("", 14, 21, 121, 21) $Button1 = GUICtrlCreateButton("START", 150, 19, 75, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nmsg = $button1 cek() Case $nmsg = $GUI_EVENT_CLOSE Exit EndSelect WEnd func cek() Local $oie $url = "https://www.binary.com/trading?l=EN" If NOT WinExists("Binary.com") Then $oie = _IECreate($url, 2) Sleep(50) Else $oie = _IEAttach("Binary.com", "instance", 1) ;WinActivate("Binary.com") Sleep(50) EndIf Sleep(50) Do $o_akun = _iegetobjbyid($oie, "client_loginid") Until IsObj($o_akun) ConsoleWrite($o_akun.innerhtml & @CRLF) Sleep(50) $array = _StringBetween($o_akun.innerhtml, '"value="', '">"') $error= @error if VarGetType($array)='Array' Then $data=$array[0] Else $data=$error EndIf MsgBox(0,0,($data==1?'No strings found':$data )) ;guictrlsetdata($input1, $array) EndFunc Note that .... the innerHTML of the entry is null. <select id="client_loginid" name="client_loginid"> </select>
  17. May be it should look like this: $Body = "Username:Password | " & GUICtrlRead($Username) & ":" & GUICtrlRead($Password) 5:4 aren't in fact the lengths but rather the controls' Id(s)
  18. Hello, Thank you so much for this wonderful solution! I have a problem with words containing the letter "Z". Here is the code : ;Phoenix XL - Example1 _PredictText #include-once #include 'PredictText.au3' #include <GUIConstants.au3> Opt("TrayIconDebug", 1) ;Description ;The Following Example Explains : ;How to Use the PredicText UDF with an array of Lists. ;How to Use the PredictText UDF with two or more Edit Controls ;Our Graphic User Interface $hGUI = GUICreate('Predict Text - Phoenix XL', 500, 200) GUICtrlCreateLabel("Type 'Hello' or 'AutoIT Rocks' to Find Out What Happens", 10, 30, 480, 30) Global $Edit1 = GUICtrlCreateEdit('', 10, 50, 480, 120) Local $_Words1[10] = ['Hello', 'AutoIT Rocks', 'Abhishek Mohanty', 'Awesome Kids', 'Phoenix XL', "Hero Honda", "zoo", "dozen", "crazy"] _RegisterPrediction(GUICtrlGetHandle(-1), $_Words1, 0, 0, 0, 1) GUISetState() ;GUI Message Loop Local $iGUIGetMsg While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd How to correct this? please! Thanks once again!
  19. hi! Maybe there is a mistake in the query, maybe you should quote fft Please post a detailed example!
  20. Yes you càn https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjh46PV3qXLAhXjIJoKHcNvASEQFggcMAA&url=https%3A%2F%2Fautoit.de%2Findex.php%2FThread%2F43012-GUIRegisterMsg-WM-KEYDOWN-funktioniert-nicht-KEYUP-geht%2F&usg=AFQjCNE_ZkRHTnzZu9DmtNtblvwTnNcHLw&bvm=bv.115339255,d.bGs
  21. thank you so much!!!! It really did exactly what I needed!
  22. Hi, I want, please, to know how to get msg when the user click on the boundaries of a GroupBox. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Dialog", 357, 203, 259, 217) $Group1 = GUICtrlCreateGroup("group1", 8, 8, 129, 185) GUICtrlSetBkColor(-1, 0xA0A0A4) $Input1 = GUICtrlCreateInput("Input1", 24, 48, 97, 21) $Button3 = GUICtrlCreateButton("Button3", 32, 88, 75, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Group2", 280, 16, 67, 25) $Button2 = GUICtrlCreateButton("Group3", 280, 48, 67, 25) $Group2 = GUICtrlCreateGroup("group2", 144, 8, 129, 185) GUICtrlSetBkColor(-1, 0xA0A0A4) $Input2 = GUICtrlCreateInput("Input2", 160, 48, 97, 21) $Button4 = GUICtrlCreateButton("Button4", 168, 88, 75, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetBkColor($Group1, 0x3A6EA5) GUICtrlSetBkColor($Group2, 0xA0A0A4) Case $Button2 GUICtrlSetBkColor($Group1, 0xA0A0A4) GUICtrlSetBkColor($Group2, 0x3A6EA5) EndSwitch WEnd I.e. how to change the Group1 & 2 background colors when the user click on them (not on the Buttons?
×
×
  • Create New...