-
Posts
17,363 -
Joined
-
Last visited
-
Days Won
119
Community Answers
-
JohnOne's post in How to create a process(?) inside a AutoIt script was marked as the answer
Pass the PID of the AutoIt script which starts them to the scripts you run.
Make the main while loop in each of those scripts conditional on the existence of the parent AutoIt process who's PID you passed it.
-
JohnOne's post in IsUpdateing, how to check updates was marked as the answer
This is a very custom function, so it's no surprise you don't find a boil in the bag solution.
Only you know what apps might update and how they update.
I'd take a look at what process runs when whatever app is updating and check for them.
-
JohnOne's post in Hotkey to release a blockinput was marked as the answer
It does not work. how could it?
#RequireAdmin HotKeySet("{F10}", "_Func") BlockInput(1) $timer = TimerInit() While TimerDiff($timer) < 10000 Sleep(10) WEnd Func _Func() BlockInput(0) EndFunc -
JohnOne's post in Determining Windows Version? @OSVersion Returns was marked as the answer
ConsoleWrite(FileGetVersion('winver.exe') & @LF) AutoIt already searches path.
-
JohnOne's post in TrayTip @CRLF was marked as the answer
Use it where you want the new line to start.
"first line" & @crlf & "second line"
-
JohnOne's post in Window with custom title bar was marked as the answer
Create an empty label where title bar would normally be, and add the parentdrag style to it.
-
JohnOne's post in GUICtrlListView_AddSubItem Bug? (error when looping) was marked as the answer
Change...
For $i = 1 To 50 To...
For $i = 0 To 50 -
JohnOne's post in Newbie for Objects was marked as the answer
Water is right.
It's too much of a broad question to ask, it boils down to asking people to perform a web search for you.
Do a bit of reading and then ask a more specific AutoIt targeted question.
-
JohnOne's post in Not able to click on button in a setup was marked as the answer
Does the setup process require admin rights?
If so, try adding #RequireAdmin to your script.
-
JohnOne's post in hotkey with single function was marked as the answer
Simplest fix, use a different HotKey to the one you are using, because you're sending it too, which is consequently sending HotKey again.
Change {SPACE} for something else.
-
JohnOne's post in exact same script doesnt run on other computer was marked as the answer
I'd first try moving
local $input1read = 1 outside of your select block.
-
JohnOne's post in Smart Way to use AdlibRegister for SplashText was marked as the answer
AdlibRegister("UpdateText", 1000) SplashTextOn("mytext", "Hilarious things") Func UpdateText() Local Static $aRoll[4] = ["Scrotum", _ "Funny bone", _ "Fanny Cradock", _ "Anal sphincter"] ControlSetText("mytext", "", "Static1", $aRoll[Random(0, 3, 1)]) EndFunc ;==>UpdateText Sleep(10000) -
JohnOne's post in Searching an Excel file was marked as the answer
#include <Array.au3> #include <Excel.au3> #include <MsgBoxConstants.au3> ; Create application object and open an example workbook Local $oAppl = _Excel_Open() If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Local $oWorkbook = _Excel_BookOpen($oAppl, @ScriptDir & "\Extras\_Excel1.xls") If @error Then MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example", "Error opening workbook '" & @ScriptDir & "\Extras\_Excel1.xls'." & @CRLF & "@error = " & @error & ", @extended = " & @extended) _Excel_Close($oAppl) Exit EndIf ; ***************************************************************************** ; Read the formulas of a cell range (all used cells in column A and B) ; ***************************************************************************** Local $aResult = _Excel_RangeRead($oWorkbook, Default, $oWorkbook.ActiveSheet.Usedrange.Columns("A:B"), 2) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 3", "Error reading from workbook." & @CRLF & "@error = " & @error & ", @extended = " & @extended) ;MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 3", "Data successfully read." & @CRLF & "Please click 'OK' to display all formulas in column A.") ;_ArrayDisplay($aResult, "Excel UDF: _Excel_RangeRead Example 3 - Formulas in column A and B") Local $Username = "Fred" For $i = 0 To UBound($aResult) -1 ; loop though array If $aResult[$i][0] = $Username Then MsgBox(0, "Answer", $Username & " uses computer " & $aResult[$i][1]) ExitLoop EndIf Next -
JohnOne's post in Using Chrome instead of IE was marked as the answer
No. not possible.
You would need to familiarize yourself with >these UDF's and rewrite your script almost entirely.
-
JohnOne's post in Little Math bug? was marked as the answer
Something to do with floating point math.
If you are just wondering why it does not work, I cannot help you.
If you're trying to fix a problem...
MsgBox(0, "", Round($Number, 1)) -
JohnOne's post in On and Off switch on a simple script was marked as the answer
I did not want it to start spamming 2 on my screen at at fast as my processor can handle.
-
JohnOne's post in Need help with MouseGetPos :/ was marked as the answer
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $file = FileOpen("lista.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $Input - InputBox("InputBox", "Coords", "562,613") $aCoords = StringSplit($Input, ",", 2) ; Read in lines of text until the EOF is reached While 1 Local $line = FileReadLine($file) Local $i If @error = -1 Then MsgBox(262144, "The End", "The End !!!") ExitLoop ClipPut($line) While 1 Local $hWnd = WinWait("[CLASS:Photoshop]", "", 10) ; Activate the Photoshop window using the handle returned by WinWait. WinActivate($hWnd) MouseClick("left", $aCoords[0], $aCoords[1], 3) ; <<<<------ THIS IS THE THING THAT BOTHERS ME <<<<------- Sleep(1000) Send("^v") Sleep(300) Send("^s") Do Sleep(200) Until PixelGetColor(342, 299) = 0xFFF791 Sleep(200) $i = $i + 1 Send($i) Sleep(500) Send("{ENTER}") Do Sleep(200) Until PixelGetColor(416, 319) = 0x21A121 Send("{ENTER}") Do Sleep(200) Until PixelGetColor(447, 438) = 0xFFFFFF ExitLoop WEnd WEnd FileClose($file) -
JohnOne's post in How to delete an element from a 1D array inside a loop was marked as the answer
https://www.autoitscript.com/autoit3/docs/libfunctions/_FileListToArray.htm
-
JohnOne's post in Hidden Button on Gui was marked as the answer
Just declare the variable first, and give it some arbitrary value.
Local $ViewFolButton = 45853997452
EDIT:
A value that will not conflict with an actual control.
-
JohnOne's post in Case / And terminology was marked as the answer
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If BitAND(GUICtrlRead($Radio11), $GUI_Checked) Then ;stuff Else ;different stuff EndIf -
JohnOne's post in Mouse and Keyboard restrictions was marked as the answer
Have you looked at kiosk mode?
-
JohnOne's post in Exit Select when first true expression found was marked as the answer
I'd put the first case in it's own If EndIf block, and use a Switch EndSwitch block for the StringLeft ones.
-
JohnOne's post in /AutoIt3ExecuteScript no longer working with compiled scripts? was marked as the answer
There is some #pragma directive you have to set to true, which is false by default, not sure which.
EDIT:
#pragma compile(AutoItExecuteAllowed, true)
-
JohnOne's post in Wordpress help was marked as the answer
Never mind.
I was having trouble installing a theme, and a possible solution I found through a web search said to add this to htaccess file
"AddType x-mapp-php5 .php"
It never worked, but page loads normally after removing that line.
-
JohnOne's post in incorrect number of subscripts Error handling was marked as the answer
If $word[7] = "PRINTER***No" Then $printercount += 1 If $word[7] = "PRINTER***Paper" Then $printercount += 1 If UBound($word) > 8 If $word[8] = "3DBUILDDATE" Then $dbdate = $word[7] If $word[8] = "COUPONS" And $word[8] = "TRIGGERED" And $word[7] = "0000" Then $zerocoupcount += 1 EndIf