4 posts in this topic
I have a text file whose data will be as below.
win10x64 ~\erwin Notallowed1! "erwin Data Modeler r9.7 (32-bit)_2500.exe" SilentInstall.exe win10x64clone1 ~\erwin Notallowed1! "erwin Data Modeler r9.7 (64-bit)_2500.exe" DM64.exe win10x64clone2 ~\erwin Notallowed1! "erwin Mart Server r9.7 (32-bit).exe" SilentInstall.exe win10x64clone3 ~\erwin Notallowed1! "erwin License Server r9.7 (32-bit).exe" SilentInstall.exe Each line will have multiple values separated by space.
If a value contains space in it, the value is surrounded by quotes.
My task is to check how many values are there in each line.
If the line contains 5 values, I need to replace the 4th value with the string contained in a variable.
If it contains 4 values then also I need to replace the 4th value followed by appending 5 th value to it as SilentInstall.exe
If the value I am replacing contains spaces then I need to surround the new value with quotes.
Any one can suggest how to do this,??
Okay so I am not sure if I can do this or not with the code I currently have but, I would like to send lastname and the first name with a comma inbetween.
so it would look like "last name,first name"
right now I just have it sending the last name.
any help or sugestions are appreciated.
$r = 1 Local $aArray = _Excel_RangeRead($oExcel, Default, Default) For $i = 1 To UBound($aArray) - 1 ;$i =0 Start from row A $sR1 = $aArray[$i] ;status $sR2 = $aArray[$i] ;first name $sR3 = $aArray[$i] ;Last name $sR5 = $aArray[$i] ;Email Address WinWaitActive ("[CLASS:MGUIWin]") Sleep (100) ControlSend("[CLASS:MGUIWin]", "", "Edit2", $sR3, & @CR) $r = $r + 1 If $r > $sBox Then Exit Endif Next
This may be quite simple, but I haven't manage to solve it yet :/
All I want to do is get the ID of Xitem, so I can click it with " _GUICtrlListView_ClickItem" .
So I need to find the item based on the that fact that I know the text/string name of that item.
#include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Example() Func Example() GUICreate("listview items", 300, 300, -1, -1) Local $idListview = GUICtrlCreateListView("col1", 10, 10, 200, 150) ;,$LVS_SORTDESCENDING) Local $idButton = GUICtrlCreateButton("ID_of_Xitem?", 75, 170, 70, 20) Local $idItem1 = GUICtrlCreateListViewItem("Aitem", $idListview) Local $idItem2 = GUICtrlCreateListViewItem("Xitem", $idListview) Local $idItem3 = GUICtrlCreateListViewItem("Zitem", $idListview) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton MsgBox(0,"","ID of Xitem is ?") _GUICtrlListView_ClickItem($clv, ?) EndSwitch WEnd EndFunc ;==>Example
I'm facing a problem that I can't solve, despite trying hard.
I have an .ini file with several sections:
[Latitude E5440] URL=http://downloads.dell.com/published/pages/latitude-e5440-laptop.html [Latitude E5450] URL=http://downloads.dell.com/published/pages/latitude-e5450-laptop.html [Latitude E5470] URL=http://downloads.dell.com/published/pages/latitude-e5470-laptop.html [Latitude E7240] URL=http://downloads.dell.com/published/pages/latitude-e7240-ultrabook.html [Latitude E7250] URL=http://downloads.dell.com/published/pages/latitude-e7250-ultrabook.html [Latitude E7270] URL=http://downloads.dell.com/published/pages/latitude-e7270-ultrabook.html Then I collect the computer model name and try to look if it exists in the ini file. But, when performing the search, I only got the index in the array.
For example, my computer model is a "Latitude E7240". An "_ArraySearch" gives me "4" as a result and because this is also the fourth place of my search in the ini file. It works well if I move the section anywhere else in the file and always give me the correct position.
Question is: How can I convert the index number to the section name so I can tell my script that if it's found in the ini file, the download URL variable will be set to the corresponding key in the ini file.
Here's my code so far:
Can someone give me an hand on this?
Why this code does not work ?
$tmp = "1111" If StringIsDigit($tmp) == True Then MsgBox(0,"",StringIsDigit($tmp) == "1") EndIf and this one works
$tmp = "1111" If StringIsDigit($tmp) == "1" Then MsgBox(0,"",StringIsDigit($tmp) == "1") EndIf