-
Posts
280 -
Joined
-
Last visited
-
Days Won
1
Neutro last won the day on July 12 2017
Neutro had the most liked content!
About Neutro
- Birthday 03/06/1986
Profile Information
-
Location
France
Recent Profile Visitors
1,015 profile views
Neutro's Achievements
-
Hadin reacted to a post in a topic: ImageSearch Usage Explanation
-
Neutro reacted to a post in a topic: GuiBuilderPlus [updated March 24, 2024]
-
Hey guys, For those who would need it, here is an updated package which allows image searching using transparency, fixing previous bugs and including an easy example. Usage: open the search.bmp image, run the script and it will use imagesearch to find the red square on your screen and move your mouse cursor in the middle of the square. This gives you an easy example on how to find an image (in this example, a red square) using a transparency setting (in this case, using white as the transparency color). Note that this only works if the image you are searching for (so the red square in this example) is not having transparent pixels itself. Some images have what is called an alpha channel mask, which means each pixel has an RGB value but also an alpha channel value which describes the transparency setting of this specific pixel. In this case since the ImageSearch transparency feature does not deal with alpha channel masks, it's impossible to find such an image using it. You'll need something more sophisticated ImageSearchTransparency2023.zip
-
Stormgrade reacted to a post in a topic: Files patch manager v1.1 (patch generator)
-
Thanks for the update How about removing the IE functions currently included in autoit since IE support has been removed by MS?
-
Neutro reacted to a post in a topic: Help with code (newbie)
-
You think that trying to find a way to solve your needs without understanding how to code properly will save you time but it wont. It's like if you try to speak spanish just using a dictionnary and not trying to understand the syntax of the spanish language Dont be afraid to learn "how to be a programmer". We were all at your place some time ago and we learned how to do it, it's not that hard So i suggest when you have a bit of free time you go to https://www.autoitscript.com/wiki where in the "tutorials" section there are enough informations on learning how to code properly. It will take you less time to learn how to code properly this way rather than trying to solve your problems without understanding how things work
-
Neutro reacted to a post in a topic: Help with code (newbie)
-
Neutro reacted to a post in a topic: Help with code (newbie)
-
You're welcome You need to use the GUICtrlRead() function to read the current letter selected in your combo when you click on your buttons and assign it to $letter
-
Hello and welcome to the forums So this is the code that you use for detecting devices (i cleaned it up a bit): Global $ourDrive = "" Global $aArray = DriveGetDrive("REMOVABLE") If ($aArray = "") Then $Combo1 = GUICtrlCreateCombo("Despositivo BOOTPACK não encontrado", 16, 64, 289, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) Else For $i = $aArray[0] To 1 Step -1 If DriveGetLabel($aArray[$i]) = "BOOTPACK_V4" then $ourDrive = $aArray[$i] $Combo2 = GUICtrlCreateCombo(StringUpper($ourDrive), 16, 64, 289, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $letter = StringUpper($aArray[$i]) GUICtrlSetData($Combo2, $letter) GUICtrlRead ($letter) EndIf Next Endif The problem comes from the fact that in your loop you replace $combo2 with a new combo instead of updating the existing combo with the new data. You need to check if one drive has already been detected or not. If not then you create the combo, if yes then you update the existing combo with the new letter. Here is an example of how you can do it: Global $ourDrive = "" Global $number_of_bootpack_drives = 0 Global $aArray = DriveGetDrive("REMOVABLE") If ($aArray = "") Then $Combo1 = GUICtrlCreateCombo("Despositivo BOOTPACK não encontrado", 16, 64, 289, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) Else For $i = $aArray[0] To 1 Step -1 If DriveGetLabel($aArray[$i]) = "BOOTPACK_V4" then $letter = StringUpper($aArray[$i]) if $number_of_bootpack_drives = 0 then ;we create the combo since it doesn't exists $Combo1 = GUICtrlCreateCombo(StringUpper($letter), 16, 64, 289, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $number_of_bootpack_drives = $number_of_bootpack_drives + 1 else ;if the combo already exists we update it to add the other drives letters GUICtrlSetData($Combo1, $letter) ; this will ADD $letter to the existing list of letters in the combo (it wont delete the existing letters in the list) $number_of_bootpack_drives = $number_of_bootpack_drives + 1 Endif EndIf Next Endif The easiest is to add a button called "scan drives again" (button4) and if you click on that button it will do the above code again.
-
I found a workaround doing this with powershell instead: $oIE = new-object -com internetexplorer.application $oIE.visible = $true $oIE.navigate2("https://intranetwebsite.com") $control = $oIE.document.IHTMLDocument3_getElementsByTagName('button') | where-object { $_.innerText -eq 'Update' } $control.click() Translated into autoit: $sPSCmd = " ""$oIE = new-object -com internetexplorer.application;$oIE.visible = $true;$oIE.navigate2('https://ourintranetwebsite'); sleep -Milliseconds 10000; $control = $oIE.document.IHTMLDocument3_getElementsByTagName('button'); $control = $oIE.document.IHTMLDocument3_getElementsByTagName('button') | where-object { $_.innerText -eq 'Update' };$control.click()"" " RunWait(@comspec & ' /c powershell.exe -executionpolicy bypass -NoProfile -WindowStyle hidden -command ' & $sPSCmd) The double quotes at the start and end of the command are required to avoid syntax error with the windows prompt shell (cmd window) PS: the below solution also works to create the IE window using autoIT and use powershell to click the button, so you can do other things with the IE window with autoIT after: #include <IE.au3> $oIE = _IECreate("https://ourintranetwebsite, 1, 1, 1) $sPSCmd = " ""$PSIE = (New-Object -ComObject 'Shell.Application').Windows() | Where-Object { $_.Name -eq 'Internet Explorer' }; $control = $PSIE.document.IHTMLDocument3_getElementsByTagName('button') | where-object { $_.innerText -eq 'Update' };$control.click()"" " RunWait(@comspec & ' /c powershell.exe -executionpolicy bypass -NoProfile -WindowStyle hidden -command ' & $sPSCmd, "", @SW_HIDE) ;do other things regularly using _IE functions with autoIT if required here _IEQuit($oIE)
-
Hey guys, We have an intranet website at my work that we use for managing users rights, and i've wrote some time ago a small script to automate the update process, which includes clicking on an "Update" button. It was working fine until yesterday it didn't anymore while nothing apparently changed. Here is the script i used: #include <IE.au3> $oIE = _IECreate("https://ourintranetwebsite.com") Local $oButs = _IETagNameGetCollection($oIE, "button") For $oBut In $oButs If StringInStr($oBut.innertext, "Update") then _IEAction($oBut, "click") Next Now when it's running i got the following error: When i add an _IEErrorHandlerRegister() to get more informations, i get this as a result: I've tried searching the web for that error but found nothing that helped. I thought the problem might have come from the computer i ran the script from, so i ran it from a sandbox but same error. I tried the script on another website to click on a button and it's working fine, so it seems the problem is located on that specific website but i have no idea why. Anyone got an idea that could help me? TIA!
-
-
Neutro reacted to a post in a topic: ISN AutoIt Studio
-
@Ravali How can we know what line 13 is in your screenshot if you dont have your line numbers in the screenshot? Please download the attached script and run it after your AS400 emulator window is opened and is waiting for input. It should move your cursor to position 6:53 on your emulator screen and write "test" on it. If you still have an "unknown object error" related to "ObjCreate" function, check the autoit help file for the ObjCreate function and try to run the example script you'll find there to see if it works or not (to check if your autoit installation is working properly or not). Also if you have an error please post a full screenshot of your autoit editor window, including line numbers and the console below if needed. AS400test.au3
-
@Ravali I think you have the correct software, but you might just had a copy / paste problem from using the code in my first post. You said you had an "Unknown function name" error when running my code as described in my first post, you shouldn't get that error since the function ObjCreate() doesn't need any additional library to work on a default autoit installation. So please follow my first post again, run the code i provided to create an object linked to session A from which you get that "unknown function name error" then post a screenshot of the error message you get in the autoit compiler window.
-
Hey, Sorry to answer a bit late but better late than never ;) For this to work you need to have the IBM iseries software installed on your computer and check that you can effectively use it to connect to interface with your AS400 with the 5250 emulator as displayed in my screenshots in my first post. If you do not have the iseries software and the 5250 interface emulator installed the object creation will fail in autoIT and you will get the error message that you had. Also in your code you used SetconnectionByName("TESTENV") but "TESTENV" here is wrong. Please read again my first post, instead of "TESTENV" this should be the letter of the session that is displayed when you open the 5250 interface emulator as shown in my screenshots (letter A and B in my examples). If you set anything else than the right letter in SetconnectionByName the code will fail. Also if i recall correctly, when i did this post back in 2017 it was on windows 7. If my memory is right i've tried using the same on Windows 10 and it also worked, but i'm not 100% sure. Also i just checked and saw that the "IBM i Access for Windows" software that includes the iseries software that i'm referring to has been discontinued if i'm not wrong: https://www.ibm.com/support/pages/ibm-i-access-windows and replaced by the new version called "IBM i Access Client Solutions". I stopped working on AS400 for a while now so i dont know if the code in my first post still work with this version, but even if IBM say in their article that the first version of I Access for Windows has been discontinued and does not support Windows 10, it might still work properly as i tested it back then when i was working on migrating our IT from windows 7 to win10 and had no problems.
-
Charlie12 reacted to a post in a topic: AS400 tasks automation
-
Neutro reacted to a post in a topic: CodeCrypter - Encrypt your Script
-
As you said, they were kids. Kids make fun of other people because they're kids, the subject is irrelevant. So you should just forget about them, hopefully when they grow up they'll become smarter and code with autoit too
-
RegEx - display string that DOESN'T match a pattern
Neutro replied to Ghost1982's topic in AutoIt General Help and Support
Hello, Functions will do what they are designed to do so you can't make them do something else However, you can use StringLeft and StringRight functions to get the first 4 characters, see if they match "www." and the last 4 to see if they match ".com". Also if you explain us what you're trying to achieve with your script using that url, maybe we can help you better -
[Solved] Trying to insert @CRLF to RichText
Neutro replied to knightstalker's topic in AutoIt General Help and Support
Hey, Perhaps what you could try is copy paste your script to a new file, run it once to get the content of the var where CRLF is not displayed properly then delete everything but the creation of the GUI, paste the text into _GUICtrlRichEdit_SetText and check if it's working or not. This should be an easier way to see where the problem is. -
Excel unresponsiveness = ((data size) x (operation complexity))² / computer performance So in the end it all depends on how your data size and your algorithms complexity will evolve with time. If they stay somewhat around what you're dealing with now you should be fine since as you said in your first message: "it has not crashed or run into any problems yet" But if you expect them to grow in size and complexity excel will become more and more unresponsive until you can't use it at all anymore. In that case i suggest you keep working with excel right now as you're familiar with it and it's working so far, but when you have some free time spend some of it to look into translating your current solution to using a real database system as stated previously.