All Activity

This stream auto-updates   

  1. Past hour
  2. Hi, can I divide a number without the reminder? For example I have a $number = 9587 and I need to know how many thousands it is (the result should be 9). The reason is I want to refine the output like this: $Number = 9578 $Output = Round($Number/1000) & "." & Mod($Number, 1000) Msgbox (0, "Result:", $Output) Due to rounding the result looks like this: "10.587" but it should be like "9.587". Thank you.
  3. The Run('notepad.exe') is just filler for another function that I use. My thinking was simple. Everyone has notpad, so its a fast way to test the script. @TheSaint Oh I know right? More often than not it was an aggravation. My theory was that one forgets its there due to lack of use, thus making it easier to accidentally hit. Over the last few days the code above has become an interical part in my normal command set (I have a list of scripts that run on startup based entirely on includes in a main autoit script, thus making it modular...), and I have not had a problem with accidentally hitting it sense then. Ultimately the small amount that I type in all caps can be mitigated by holding SHIFT, leaving the capslock key redundant at best.
  4. Today
  5. So I am trying to separate test codes into known and unknown test codes, and write the unknowns to a specific test file based on users selection. It works GREAT for the first unknown test code, but then it seems to get stuck? And the program also doesn't stop running? I appreciate the help guys #include <Array.au3> #include <MsgBoxConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $TCArray[5] ; Dummy data for now Global $SampIDArray[5] $TCArray[0] = "300.1" $TCArray[1] = "300.0" $TCArray[2] = "poop" $TCArray[3] = "zomgnewtestcode" $TCArray[4] = "fet" $SampIDArray[0] = "Sample1" $SampIDArray[1] = "Sample2" $SampIDArray[2] = "Sample3" $SampIDArray[3] = "Sample4" $SampIDArray[4] = "Sample4" ;---------- Function Calls here AddAllTestCodes() Knownornot() ;~ Addtolistifknownfunction() ;--------- Functions Below here Func AddAllTestCodes() Global $testcodeIC1[3] = ["300.1", "300.0", "Poop"] Global $testcodeIC2[3] = ["218.6", "7199_LL", "Testing"] Global $testcodeIC3[3] = ["blah", "blah2", "blah3"] Global $totaltestcodes = UBound($testcodeIC1) + UBound($testcodeIC2) + UBound($testcodeIC3) Global $knowntestcode[0] _ArrayAdd($knowntestcode, $testcodeIC1) _ArrayAdd($knowntestcode, $testcodeIC2) _ArrayAdd($knowntestcode, $testcodeIC3) ;~ _ArrayDisplay($knowntestcode) EndFunc ;==>AddAllTestCodes Func Knownornot() For $i = 0 To UBound($TCArray) - 1 ;should write zomgnewtestcode to the unknown file, eventually this will prompt me to assign it to IC1, 2, or 3. But for now I just want to debug why the IF statement isn't working. Local $found = _ArraySearch($knowntestcode, $TCArray[$i]) If $found = -1 Then #Region ### START Koda GUI section ### Form=D:\GodModeAccount\Desktop\ArraydataClientIDHidden\ICSelectGUI.kxf $Form1 = GUICreate("Form1", 434, 146, 192, 200) $IC1 = GUICtrlCreateButton("IC 1", 24, 112, 89, 25) $IC2 = GUICtrlCreateButton("IC 2", 120, 112, 105, 25) $IC3 = GUICtrlCreateButton("IC3/4", 232, 112, 81, 25) $IC5 = GUICtrlCreateButton("IC5 or Unknown", 320, 112, 105, 25) $Label1 = GUICtrlCreateLabel("This test code was not found: Please select a IC to assign it to! " & $TCArray[$i], 8, 8, 412, 89) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $IC1 FileWrite(@ScriptDir & "\IC1testcodes.txt", $TCArray[$i] & " " & @CRLF) GUISetState(@SW_HIDE) Case $IC2 FileWrite(@ScriptDir & "\IC2testcodes.txt", $TCArray[$i] & " " & @CRLF) GUISetState(@SW_HIDE) Case $IC3 FileWrite(@ScriptDir & "\IC3testcodes.txt", $TCArray[$i] & " " & @CRLF) GUISetState(@SW_HIDE) Case $IC5 FileWrite(@ScriptDir & "\IC5testcodes.txt", $TCArray[$i] & " " & @CRLF) GUISetState(@SW_HIDE) EndSwitch WEnd EndIf Next EndFunc ;==>Knownornot
  6. You know that this is the wrong forum to post a question? BTW: Please use the AutoIt code tags (the "<>" button in the editor) when posting code.
  7. #RequireAdmin #include <SendMessage.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WinAPIGdi.au3> #include <Array.au3> #include <WinAPIDiag.au3> $Imglocation = @ScriptDir&"\Image\testimg.bmp" _GDIPlus_Startup() Local $Bitmap = _GDIPlus_BitmapCreateFromFile($Imglocation) Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($Bitmap) Local $imgSize = _WinAPI_GetBitmapDimension($hBitmap) Local $imgBits = DllStructCreate('dword[' & ($imgSize.X * $imgSize.Y) & ']') _WinAPI_GetBitmapBits($hBitmap, DllStructGetSize($imgBits), DllStructGetPtr($imgBits)) _WinAPI_DisplayStruct($imgBits) MsgBox(0, "", DllStructGetData($imgBits, 1, 1)) _GDIPlus_Shutdown() DllstructGetData can't get data color B, G, R value. Who's know that? teach me plz
  8. #RequireAdmin #include <SendMessage.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WinAPIGdi.au3> #include <Array.au3> #include <WinAPIDiag.au3> $Imglocation = @ScriptDir&"\Image\testimg.bmp" _GDIPlus_Startup() Local $Bitmap = _GDIPlus_BitmapCreateFromFile($Imglocation) Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($Bitmap) Local $imgSize = _WinAPI_GetBitmapDimension($hBitmap) Local $imgBits = DllStructCreate('dword[' & ($imgSize.X * $imgSize.Y) & ']') _WinAPI_GetBitmapBits($hBitmap, DllStructGetSize($imgBits), DllStructGetPtr($imgBits)) _WinAPI_DisplayStruct($imgBits) MsgBox(0, "", DllStructGetData($imgBits, 1, 1)) _GDIPlus_Shutdown() DllstructGetData can't get data color B, G, R value. Who's know that? teach me plz
  9. If ($ColumnC[$i] <> $testcodeIC1) AND ($ColumnC[$i] <> $testcodeIC2) AND ($ColumnC[$i] <> $testcodeIC3) Then FileWrite(@ScriptDir & "\ICUNKNOWN.txt", $ColumnB[$i] & " " & $ColumnC[$i] & @CRLF) EndIf
  10. Hi! AutoIT successfully read data from plink console with StdoutRead(). But plink print some incorrect symbols (see screenshot). From other console ssh-clients (openssh, putty, Bitvise stermc) StdoutRead() return empty string. Help me please solve the problem.
  11. & is a string concatenator according to the help file.
  12. Ummm to answer my own question.. apparently you can use AND but not "&" ? Even though you can use & everywhere else? I'm sooooo confused...
  13. Why doesn't my first if statement below work? The rest work great. Can you not use "&" in a if statement? Is there a work around for that? Global $ColumnC[5] Global $ColumnB[5] Global $testcodeIC1="300.1" Global $testcodeIC2="218.6" Global $testcodeIC3="poop" $ColumnC[0] = "300.1" $ColumnC[1] = "300.0" $ColumnC[2] = "poop" $ColumnC[3] = "zomgnewtestcode" $ColumnC[4] = "300.1" $ColumnB[0] = "Sample1" $ColumnB[2] = "Sample2" $ColumnB[3] = "Sample3" $ColumnB[4] = "Sample4" $ColumnB[4] = "Sample5" For $i = 0 To UBound($ColumnC) - 1 ;should write zomgnewtestcode to the unknown file, eventually this will prompt me to assign it to IC1, 2, or 3. But for now I just want to debug why the IF statement isn't working. If $ColumnC[$i] <> $testcodeIC1 & $ColumnC[$i] <> $testcodeIC2 & $ColumnC[$i] <> $testcodeIC3 Then FileWrite(@ScriptDir & "\ICUNKNOWN.txt", $ColumnB[$i] & " " & $ColumnC[$i] & @CRLF) EndIf Next For $i = 0 To UBound($ColumnC) - 1 If $ColumnC[$i] = $testcodeIC1 Then FileWrite(@ScriptDir & "\IC1.txt", $ColumnB[$i] & " " & $ColumnC[$i] & @CRLF) EndIf Next For $i = 0 To UBound($ColumnC) - 1 If $ColumnC[$i] = $testcodeIC2 Then FileWrite(@ScriptDir & "\IC2.txt", $ColumnB[$i] & " " & $ColumnC[$i] & @CRLF) EndIf Next For $i = 0 To UBound($ColumnC) - 1 If $ColumnC[$i] = $testcodeIC3 Then FileWrite(@ScriptDir & "\IC3.txt", $ColumnB[$i] & " " & $ColumnC[$i] & @CRLF) EndIf Next
  14. You guys rock.. Now I can expand from here
  15. This remark reminded me of the IT crowd when Roy wears the shirt that says RTFM 😂 Fact that was the very first episode when they call him for help
  16. @mattia100, Welcome, In case you really want us to help in stead of code it all for you, you need to share what you have that isn't working and it would help when you would be much clearer on what you exactly want to do. Moved to its own topic.
  17. Moved to the appropriate forum, as the Dev forum very clearly states:
  18. @hackerheart dog ate your help file? Look at _IsPressed; 01 for left mouse button,
  19. HI! 1) I want to create a FF web page in background... i want to say a web page that can't be seen in the application bar but only in Windows Task Manager... maybe using __FFStartProcess? in fact i tried to use it but the parameter "hide" only can minimize the page, but not put it in background... 2) After creating this hide page, i would to open a macro of the iMacros addon, always all in hide mode... it is possible to do it? anybody can help me? Thanks!!
  20. Yes that was my mistake Thank you!
  21. what exactly is not working? I guess you do have to disable the hotkey before sending the actual character like: Func _Config() If GUICtrlRead($testbox) = 1 Then MsgBox($MB_SYSTEMMODAL, "Title", "The Checkbox is active.", 3) Else HotKeySet("c") Send ("c") HotKeySet("c", "_Config") EndIf EndFunc Jos Ps: Using codeboxes is a little easier to read.
  22. You dont need to download the Script. I will show it here: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 406, 308, 261, 200) $testbox = GUICtrlCreateCheckbox("Testbox", 136, 104, 97, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### HotKeySet("c", "_Config") HotKeySet("{ESC}", "_Beenden") While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit     EndSwitch WEnd Func _Config()     If GUICtrlRead($testbox) = 1 Then         MsgBox($MB_SYSTEMMODAL, "Title", "The Checkbox is active.", 3)     Else         Send ("c")         EndIf EndFunc Func _Beenden()     Exit EndFunc
  23. Hey i am new in AutoIT. I am searching a Way to send a letter that is linked to a hotkey. Its possible? I made a little GUI but it doesnt work. ESC=Exit c=Show Message Box or if the Checkbox isnt active send "c" Greetz Test-c.au3
  24. Hello. You could do this: Global $ColumnC[5] Global $ColumnB[5] $ColumnC[0] = "300.0" $ColumnC[1] = "300.0" $ColumnC[2] = "300.1" $ColumnC[3] = "300.0" $ColumnC[4] = "300.1" $ColumnB[0] = "Sample1" $ColumnB[1] = "Sample2" $ColumnB[2] = "Sample3" $ColumnB[3] = "Sample4" $ColumnB[4] = "Sample5" ;make sure $ColumnC and $ColumnB have same bound For $i = 0 To UBound($ColumnC) - 1 If $ColumnC[$i] = "300.1" Then FileWrite(@ScriptDir & "\IC3.txt", $ColumnB[$i] & " " & $ColumnC[$i] & @CRLF) EndIf Next Saludos
  25. For what you are wanting to do _FileWriteFromArray is the wrong function to use. It is designed to write the whole or specified section of the array to a file at once. As such it creates a new file each time overwriting any existing file. For your purposes you need to use FileWrite or FileWriteLine as shown in the example below. #include <FileConstants.au3> Global $ColumnC[10] Global $ColumnB[10] $ColumnC[1]="300.0" $ColumnC[2]="300.0" $ColumnC[3]="300.1" $ColumnC[4]="300.0" $ColumnC[5]="300.1" $ColumnB[1]="Sample1" $ColumnB[2]="Sample2" $ColumnB[3]="Sample3" $ColumnB[4]="Sample4" $ColumnB[5]="Sample5" Local $hFile = FileOpen(@ScriptDir & "\IC3.txtm", $FO_OVERWRITE) For $i= 0 to UBound($ColumnC) -1 ;~ ConsoleWrite($ColumnC[$i] & @LF) If $ColumnC[$i]="300.1" Then FileWriteLine(@ScriptDir & "\IC3.txt", $ColumnB[$i] & " " & $ColumnC[$i]) EndIf Next FileClose($hFile) ConsoleWrite(UBound($ColumnC))
  26. Hello You can do this: Local $sShortcut = "C:\Users\User\Desktop\someshortcut.lnk" _SetShortcutRunAsAdmin($sShortcut);Enable-Set advanced settings Run as administrator true ;~ _SetShortcutRunAsAdmin($sShortcut,False);Disable-Set advanced settings Run as administrator false Func _SetShortcutRunAsAdmin($sShortcutFullPath, $bRunAsAdmin = True) Local $hFile = FileOpen($sShortcutFullPath, 17) FileSetPos($hFile, 21, 0) FileWrite($hFile, $bRunAsAdmin ? 0x20 : 0x00) FileClose($hFile) EndFunc ;==>_SetShortcutRunAsAdmin Saludos
  27. As @BrewManNH stated earlier in this thread, MozRepl no longer works with the latest versions of FF. I believe it stopped working correctly with FF 54.
  1. Load more activity