-
Posts
142 -
Joined
-
Last visited
About 31290
- Birthday 07/13/1984
Recent Profile Visitors
504 profile views
31290's Achievements

Adventurer (3/7)
2
Reputation
-
Extract multiple rows from Excel Read returned array
31290 replied to 31290's topic in AutoIt General Help and Support
@Subz I warmly thank you for pointing me in the way I want! Fortunately, there are only 6 Rows I need to display I admit I forgot to get a separate function for me to make the search but I was really unable to make the code inside it. Have a good one! -
Good day everyone, So, I'm trying to extract all rows from a searched string within an array. Pretty sure I'm missing something here but arrays are not my thing despite I've read the help file, the wiki and many topics on the forum (yeah yeah, I'm probably dumb :D) Using the Excel UDF, I can easily put the whole file content into an array: #include <Excel.au3> #include <Array.au3> #include <MsgBoxConstants.au3> ; Create application object Local $oExcel = _Excel_Open() If @error Then Exit MsgBox(16, "Excel UDF: _Excel_BookOpen Example", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Global $sWorkbook = @ScriptDir & "\LAP.xlsx" Global $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_BookOpen Example 1", "Error opening '" & $sWorkbook & "'." & @CRLF & "@error = " & @error & ", @extended = " & @extended) ; Read column C Global $oRange = $oWorkbook.ActiveSheet.UsedRange.SpecialCells($xlCellTypeLastCell) Global $aResult = _Excel_RangeRead($oWorkbook, Default, "B1:B"" & $oRange.Row) _ArrayDisplay($aResult) _Excel_BookClose($sWorkbook) _Excel_Close($oExcel) From above, I can just have the whole B$ Rows from the whole array content but what I'd like to achieve is the following: Search for something in Col A$ and then retrieve the corresponding rows from the results: $LAP = InputBox("LAP", "Search for LAP", "") Doing so, I 'm able to retrieve the result index in the array by displaying $LAP content but can't get the related rows. Here's the excel file sample 100% this is simple as f* but my mind seems not to want to find it more Thanks a lot any help that might come. -31290-
-
31290 reacted to a post in a topic: Net Local group with Space Name Psexec
-
Net Local group with Space Name Psexec
31290 replied to 31290's topic in AutoIt General Help and Support
My goodness, you were right... That was the thing. I probably stayed too much looking at this line and to be honest, I'm not the best at this Thank you Sir. Please keep safe! -
Hi everyone, Hope you are doing fine by the time being :/ Well, seems that I'm running into an issue while trying to add an Active domain security group to a remote computer that has a space in it. I've been searching for quite a while now and seems that my search did not get well. The ideal solution for me would be to use Psexec.exe as I can run it with my admin credentials whereas using WMIServices, I don't know how to launch that with these credentials. Here's what I wrote so far: $sADGroupName as a space in it and there's nothing I can do about, we have to respect a naming convention but it would be "Admins REMOTEMACHINENAME" Func f_AddADGroup2localAdmin() SplashTextOn("", "Adding " & $sADGroupName & " to the Local Administrators Group.", 1000, 100, -1, -1, 33, -1, -1, 700) $sCommand = $sResources & 'PsExec -accepteula \\' & $sServName & ' net localgroup Administrators MYDOMAIN\"' & $sADGroupName & '" /add' RunAsWait($sTechGID, "MYDOMAIN", $sTechPWD, 4, $sCommand, @SW_SHOW) SplashOff() ; f_MoveADObject() End Func What is weird is when I output the $sCommand variable, the space is in here but it seems not to be passed in my psexec command when I run it. Another thing I saw is that 4 times out of 10, psexec does not even launch. So I was also wondering if there could be another way to add the "spaced" group with my admin credentials on a remote server other than psexec. Thanks all in advance for the lights you may provide to me and keep safe! -31290-
-
lIlIIlIllIIIIlI reacted to a post in a topic: Keyboard remapping
-
Well, thanks again Subz. I was beginning playing around with _GUICtrlListView_XXX functions. But yours is faster and efficient. You have a good day Sir
-
31290 reacted to a post in a topic: Combine 32 & 64 Reg values
-
@Subz and others Sorry to bother again but I need you help again. I'm now facing another thing which is that I cannot retrieve the uninstall key string. I just don't understand why my _Uninstall() function is not working: Func _Uninstall() Local $proc = StringSplit(GUICtrlRead(GUICtrlRead($idListView)), '|', 1) If $proc[1] == 0 Then Return -1 Msgbox (0, "", $proc[5]) EndFunc Nothing simply happens. When displaying the $proc array, I just have two values, 0 & 1 :/ Then main goal here is to retrieve the uninstall sting displayed in the ListView. Full code so far: Thanks in advance -31290-
-
Here I meant combining the 2 reg. keys in the same array But no worries, question has been answered by subz and I can go on with the tool I'm writing
-
@VIP > Thanks for your input but I was talking about combining HKLM64 & HKLM @Subz > Your example is just what I've expected! thanks a lot. Now I can figure out how to achieve that! @Earthshine > Thanks again for your help!
-
31290 reacted to a post in a topic: Combine 32 & 64 Reg values
-
31290 reacted to a post in a topic: Combine 32 & 64 Reg values
-
31290 reacted to a post in a topic: Combine 32 & 64 Reg values
-
31290 reacted to a post in a topic: Combine 32 & 64 Reg values
-
What do you mean by that? I've just compiled it and ran just fine. Thanks for your info above, I'll test that. -31290-
-
Hi everyone, I'm currently writing a script that allow me to list all currently installed software on a computer but some of the are listed in the HKLM64 hive of the registry whereas 95% of all others are in the HKLM "normal" one. Thing is, I'd like to combine these two reg key into one single ListView item. Here's my code so far, knowing that it's working on both cases (changing to HKLM64 or HKLM short) Thanks in advance for the help -31290-
-
31290 reacted to a post in a topic: find specific piece of link in web page
-
31290 reacted to a post in a topic: find specific piece of link in web page
-
31290 reacted to a post in a topic: find specific piece of link in web page
-
find specific piece of link in web page
31290 replied to 31290's topic in AutoIt General Help and Support
Danp2, Yes, this is true, no need to add the quotes, my bad How could I have missed that. Many thanks for your help, all of you! -31290- -
find specific piece of link in web page
31290 replied to 31290's topic in AutoIt General Help and Support
Hi all, Thanks a lot for your inputs To check whether this is a .exe ending link or not, I've simply added For $oLink In $oLinks If StringInStr($oLink.href, ".exe") Then ConsoleWrite("Debug: Match! " & $oLink.href & @LF) ;~ Else ;~ Do other stuff EndIf Next But, taking my InetGet from what was working in my first post code, this is now not working anymore. $download = InetGet('$oLink.href', $dir, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) ;Downloading the BIOS Do I have to somehow transform the "$oLink.href" variable to something else (string or so?) to make that work? -
Hi everyone, hope you are doing fine Well, I'm currently writing a small script that goes to a certain web page, finds the first link of a specified section and download the file associated to this link. Depending on the computer that the tool is launched, the script gets the computer model and search in the (provided here) ini file which link to follow. At first, Dell was kind enough to provide only one link but now, they provide two of them. The first one is now a .txt file ( ) whereas my script has been designed to download only the fist and latest link released for the BIOS Update. Here's the current code which is working with only the first and latest link of the BIOS category: So the question is: In the case of double links like shown in the picture above, how it is possible to tell the script to download only the link containing an the .exe file? Of course, I could have changed the array result to [1] instead of [0] [which is working] but it seems that Dell does that randomly and that I deal with a lot of computer models. Thanks for the help you can provide, -31290- SEE_BIOS_LINKS.ini
-
Hi Water, That is perfect, thanks a lot
-
Hi fellows Is there a way to get the "sAMAccountName" of an account by giving my script the "Displayname" properties that I have stored in an excel file? Thanks -31290-