Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/26/2014 in all areas

  1. Gianni

    Android development

    an easy way.... I have not tried it yet, but a friend of mine told me that is not bad ....
    3 points
  2. Gianni

    Capture/Get from Console

    Hi anhyeuem also, try this (note that this will work only if your program, that is contained in the $a variable, will allow I/O redirection....) #include <Constants.au3> Local $dos_output = "" ; declare a variable to get output ; execute your program hidden and with output redirected Local $cmd = Run($a & " a" & " /t " & $t & " /d " & $d & " /du " & $du & " /f " & $f & " /p " & $p & " /v " & $szText, "", @SW_HIDE, $STDOUT_CHILD) ; Local $cmd = Run("ping localhost", "", @SW_HIDE, $STDOUT_CHILD) ; this is a working example While Not @error ; wait the end of your program $dos_output &= StdoutRead($cmd) ; get the output from your program while is running WEnd MsgBox(0, "", $dos_output) ; display the final output of your program
    2 points
  3. Moriba

    Android UDF

    Hello, I created this UDF last year for my Orient Myanmar Language System. This UDF can control any Android devices. So used it wisely. ; #CURRENT# ===================================================================================================================== ; _Android_Call ; _Android_CommandExists ; _Android_Connect ; _Android_Dial ; _Android_FileExists ; _Android_Flash ; _Android_ForceStopPackage ; _Android_GetBatteryHealth ; _Android_GetBatteryLevel ; _Android_GetBatteryPlugType ; _Android_GetBatteryStatus ; _Android_GetBatteryTechnology ; _Android_GetBatteryTemperature ; _Android_GetBatteryVoltage ; _Android_GetDeviceID ; _Android_GetExternalStorageDirectory ; _Android_GetLegacyExternalStorageDirectory ; _Android_GetNetworkClass ; _Android_GetNetworkCountryISO ; _Android_GetNetworkOperator ; _Android_GetNetworkOperatorName ; _Android_GetNetworkType ; _Android_GetNetworkTypeName ; _Android_GetPackageInfo ; _Android_GetPhoneType ; _Android_GetProperty ; _Android_GetSerialNumber ; _Android_GetSIMCountryISO ; _Android_GetSIMOperator ; _Android_GetSIMOperatorName ; _Android_GetSIMState ; _Android_GetState ; _Android_HasBusyBox ; _Android_HasRootAccess ; _Android_Install ; _Android_IsAirplaneModeOn ; _Android_IsBatteryCharged ; _Android_IsBatteryLow ; _Android_IsBatteryPresent ; _Android_IsBootloader ; _Android_IsNetworkRoaming ; _Android_IsOffline ; _Android_IsOnline ; _Android_IsScreenOn ; _Android_Pull ; _Android_Push ; _Android_Reboot ; _Android_Remount ; _Android_Send ; _Android_SendSMS ; _Android_Shell ; _Android_StartActivity ; _Android_TakeSnapshot ; _Android_Uninstall ; _Android_WaitForDevice ; _Android_Wake ; _Android_WipeDataCache ; =============================================================================================================================== Download Android UDF (11.22.2014) Download ADB, Fastboot & AAPT Here I will accept whatever your suggestion. Can improve my UDF. I love AutoIt. It's so easy and powerful.
    1 point
  4. JohnOne

    Android development

    Been thinking about having a pop at android applications and wondering what is the best IDE and what not. Most results I get from web search is Eclipse, but also seen Android studio. Any android devs here have any input on which would be best to get started with? I've seen a few threads similar but from a few years ago so I expect things have moved on. I did download Eclipse because I seen you could develop in C++ and I mistakenly thought I could create Android app in C++. I've spent the best part of today finding out I was wrong, it just creates C++ binaries. I don't want to make any more incorrect assumptions. I'd sooner develop in windows 7, but not greatly opposed to setting up a VM with a different OS if the benefits are good enough. Any comments or snidey remarks welcome.
    1 point
  5. JohnOne

    help please

    MsgBox(0,0,"You're welcome")
    1 point
  6. JohnOne

    help please

    HiYA!
    1 point
  7. nullschritt

    Android UDF

    Maybe you could add a demo script?
    1 point
  8. Gianni

    Capture/Get from Console

    what is the program that you want to run? (what is the content of the $a variable?) edit: ....I had not seen the post # 7 sorry
    1 point
  9. Here is a 1 to 1 translation of the CMD code to AutoIt3 code. It is has multiple blocks of code to handle $F which you could merge into one block. Some useless code that could be removed. Perhaps enough code in it so that you can clean it up or perhaps rewrite and make something good from it. ;@ECHO OFF ;SETLOCAL ;SET "M=Autoplay.exe" ;SET "S=123\test\Microsoft .NET Framework 4.0\Setup.exe" ;SET "F=" ;SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\" ;SET "_=" $M = 'Autoplay.exe' $S = '123\test\Microsoft .NET Framework 4.0\Setup.exe' $F = '' $N = 'HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\' $_ = '' ;FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A") ;IF NOT DEFINED _ ( ; ECHO= %M% not found ; ECHO= Press any key to exit ; PAUSE >NUL ; GOTO :EOF) $A = DriveGetDrive('ALL') If IsArray($A) Then For $1 = 1 To UBound($A) -1 If DriveStatus($A[$1]) = 'READY' And FileExists($A[$1] & '\' & $M) Then $_ = $A[$1] ExitLoop EndIf Next $A = '' EndIf If $_ == '' Then MsgBox(0x40030, @ScriptName, $M & ' not found' & @CRLF & 'Click OK to exit') Exit 1 ; Goto :EOF EndIf ;IF NOT EXIST "%_%%S%" ( ; ECHO= %_%%S% not found ; ECHO= Press any key to exit ; PAUSE >NUL ; GOTO :EOF) If Not FileExists($_ & '\' & $S) Then MsgBox(0x40030, @ScriptName, $_ & '\' & $S & ' not found') Exit 1 ; Goto :EOF EndIf ;FOR %%A IN (Client Full) DO ( ; REG QUERY "%N%%%A" /V INSTALL >NUL 2>&1 && SET "F=Yes") For $A In StringSplit('Client Full', ' ', 3) $F = RegRead($N & $A, 'Install') If $F == '1' Then ExitLoop Next ;IF NOT DEFINED F ( ; ECHO= %S:\Setup.exe=% not found ; ECHO= ; ECHO= Installing %S:\Setup.exe=%... ; CALL :PRE) If Not ($F == '1') Then SplashTextOn(@ScriptName, $S & ' not found' & @CRLF & 'Installing ' & $S) _PRE() SplashOff() Exit ; Goto :EOF EndIf ;:MAIN ;IF DEFINED F ( ; ECHO= Now Installing %M% ; ECHO= ; ECHO= Please wait... ; ECHO= ; "%_%%M%" ; PING -n 8 127.0.0.1 1>NUL) ELSE (ECHO= ; ECHO= Installation Failure ; ECHO= Press any key to exit ; PAUSE >NUL) ;GOTO :EOF If $F == '1' Then SplashTextOn(@ScriptName, 'Now installing ' & $M & @CRLF & 'Please wait...', 600, 100) ShellExecuteWait('"' & $_ & '\' & $M & '"') Sleep(8000) SplashOff() Else ; previous block of code runs installer on a Not $F == '1' condition so why message failure here? ; this code will never be run due to previous block of code that reaches :EOF at going to :PRE MsgBox(0x40000, @ScriptName, 'Installation failure. Click OK to exit.') EndIf Exit ; Goto :EOF ;:PRE ;ECHO= ;START "" /WAIT "%_%%S%" /q /norestart && (SET F=Yes) Func _PRE() SplashTextOn(@ScriptName, 'Now installing ' & $_ & '\' & $S & @CRLF & 'Please wait...', 600, 100) ShellExecuteWait('"' & $_ & '\' & $S & '"', '/q /norestart') SplashOff() ; setting $F seems useless here just before reaching :EOF $F = '1' EndFunc Happy coding
    1 point
  10. It's not related to autoit, you can find on internet the difference between them. The standard output corresponds to ConsoleWrite and standard error corresponds to ConsoleWriteError in autoit. The developer chooses to wether write in one of them, depending on wether it's an information or an error. Br, FireFox.
    1 point
  11. Hi, Take a look at StdoutRead in the helpfile. Br, FireFox.
    1 point
  12. Something like this ? #include <WindowsConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') Local $msg Local $hForm = GUICreate('Test ' , 400, 250) Local $Input = GUICtrlCreateEdit('', 10, 10, 380, 200, $WS_HSCROLL + $WS_VSCROLL + $ES_READONLY) Local $Button = GUICtrlCreateButton('Exit', 300, 220, 90, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE OR $msg = $Button Then Exit WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $nNotifyCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($Input) Switch $nNotifyCode Case $EN_SETFOCUS DllCall('user32.dll', 'int', 'HideCaret', 'hwnd', $lParam) ; => _WinAPI_HideCaret($lParam) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFUnc
    1 point
×
×
  • Create New...