Jump to content

yclee99

Active Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by yclee99

  1. Thanks for all your replies. I manage to use above tool to get the information.
  2. Sorry. I missed your earlier post. I am not able to find the suggested tool (faq 31) online
  3. I tried _GuiCtrlListBox_SetCurSel() and unable to select the row.
  4. It shows the following List3&Register&Change&Delete&ExitProjects Above result is the same as what I got from using AutoIt Windows Info.
  5. My current codes perform _Excel_RangeWrite when matching is found and skip _Excel_RangeWrite when there is NO matching. I will try to modify my codes as per your suggestion above. The problem is I don't know who to write 2D array from certain cell (i.e. from B2). I was not able to find the sample in the forum.
  6. Thanks guys. I manage to develop the function that I am looking for. Special thanks to BigDaddyO as I am using the XPDF_gettext function to archive the functionality. My next task it to improve the tool performance (speed). Personally, I think Line 3 should be take out from the loop and just do 1 time _Excel_rangeWrite the whole range but I am struggle to find the way. Any advise? For $i = 1 To UBound($aDatasheet) - 1 $readPDF = _XPDF_GetText($sDatasheetDir & $aDatasheet[$i]) _Excel_RangeWrite($oNewWorkbook, "Sheet1", $sDatasheetDir & $aDatasheet[$i], "A" & $i + 1) For $j = 1 To UBound($aEquipment) - 1 $readPDFoutput = StringReplace($readPDF, $aEquipment[$j], $aEquipment[$j]) $iReplacedCount = @Extended If $iReplacedCount Then $iCol = $j + 1 $sLetter = _Excel_ColumnToLetter($iCol) _Excel_RangeWrite($oNewWorkbook, "Sheet1", $iReplacedCount, $sLetter & $i + 1) EndIf Next _Excel_BookSave($oNewWorkbook) Next
  7. Thanks for your reply.
  8. I am still unable to get it work with ControlListView. Anyway, thanks.
  9. Dear All, I have large number PDF files which I need to checked each of them whether containing certain string (equipment tag name). Example: I have 500 PDF files and I want to know which PDF files contains the specific equipment tag name. There are 100 equipment tag name in total. In the past, we did this process manually by opening PDF file and search for the equipment tag name. We don't really care the equipment tag name is located at which page. What is important to use is the PDF files contains which equipment tag name. This process is really time consuming. I wonder it there a way to do it automatically. My original idea is to convert the PDF to text file (XPDF - pdftotext) and search for for the equipment tag name. Is there any better way to deal with this? p/s: I just found out that pdftotext is not free as I am using it for commercial purpose. I am trying to avoid using pdftotext.
  10. Thanks for the information. I tried but I still cannot get the Project Name information. Below is the results using the above script. Func=[GetAllWindowsControls]: ControlCounter=[ 1] ControlID=[46071] Handle=[0x001302E0] ClassNN=[ Button1] XPos=[ 86] YPos=[ 255] Width=[ 105] Height=[ 23] IsVisible=[1] Text=[&Register]. Func=[GetAllWindowsControls]: ControlCounter=[ 2] ControlID=[46072] Handle=[0x0011025C] ClassNN=[ Button2] XPos=[ 201] YPos=[ 255] Width=[ 98] Height=[ 23] IsVisible=[1] Text=[&Change]. Func=[GetAllWindowsControls]: ControlCounter=[ 3] ControlID=[46073] Handle=[0x001B04E0] ClassNN=[ Button3] XPos=[ 312] YPos=[ 255] Width=[ 86] Height=[ 23] IsVisible=[1] Text=[&Delete]. Func=[GetAllWindowsControls]: ControlCounter=[ 4] ControlID=[ 1] Handle=[0x004C044A] ClassNN=[ Button4] XPos=[ 410] YPos=[ 254] Width=[ 79] Height=[ 23] IsVisible=[1] Text=[&Exit]. Func=[GetAllWindowsControls]: ControlCounter=[ 5] ControlID=[ -1] Handle=[0x001C02D2] ClassNN=[ Button5] XPos=[ 9] YPos=[ 12] Width=[ 476] Height=[ 228] IsVisible=[1] Text=[Projects]. Func=[GetAllWindowsControls]: ControlCounter=[ 6] ControlID=[ 0] Handle=[0x0019047A] ClassNN=[ SysHeader321] XPos=[ 21] YPos=[ 32] Width=[ 449] Height=[ 16] IsVisible=[1] Text=[]. Func=[GetAllWindowsControls]: ControlCounter=[ 7] ControlID=[46065] Handle=[0x000B02D4] ClassNN=[ SysListView321] XPos=[ 18] YPos=[ 29] Width=[ 453] Height=[ 197] IsVisible=[1] Text=[List3].
  11. Hi. I would like to know how to get the text (refer to attached image, "Project Name" column)? The Window Info is shown below. >>>> Window <<<< Title: Utility To Change Project's Attribute Class: #32770 Position: 550, 268 Size: 501, 324 Style: 0x94C800C4 ExStyle: 0x00050101 Handle: 0x0010035C >>>> Control <<<< Class: Button Instance: 5 ClassnameNN: Button5 Name: Advanced (Class): [CLASS:Button; INSTANCE:5] ID: Text: Projects Position: 9, 12 Size: 476, 228 ControlClick Coords: 191, 100 Style: 0x50000007 ExStyle: 0x00000004 Handle: 0x000D0280 >>>> Mouse <<<< Position: 753, 405 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< List3 &Register &Change &Delete &Exit Projects >>>> Hidden Text <<<<
  12. Thanks dude... After applied the script to my main script, I am facing another 2 issues. I will tried to solve first before seek for help.... p/s:basically your scirpt doesn't have any problem...
  13. Does the input box accept 'ENTER' button? Update automatically once ENTER is pressed
  14. Thanks a lot guys. This is the 'function' that I want. I will try to applied in my main script.
  15. I'm trying something... create an input to get number of combo required $RSVpc = GUICtrlCreateInput("1", 500, 45, 60, 20) ;Number of VIEW PC autoIT will base on user input then create number of combo required. $x3 = 45 For $FLoop3 = 1 To GUICtrlRead($RSVpc) $x3 = $x3 + 25 ;for combo location purpose GUICtrlCreateInput("VIEW0804", 500, $x3, 60, 20) Next But seem like my script doesn't get the update input from user. Currently the number of combo that created is based on $RSVpc default value which is 1. Anyone can give me some ideal how to create a script that number of combo creates will base on user input
  16. problem solved... admin can close my thread.
  17. what a simple mistake... thanks a lot...
  18. Sorry... I would like to apologize... I didn't not read script that you guys post carefully. I deleted my post as I know is my mistake and I would like to repost it again. Here is my original script... even after I modified it, it still showing blank at the 7th combo. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #include <GUIConstantsEx.au3> GUICreate("My GUI Tab", 200, 350); will create a dialog box that when displayed is centered GUICtrlCreateTab(0, 0, 200, 350) GUICtrlCreateTabItem("Main") GUICtrlCreatePic("C:\Documents and Settings\40203929\Desktop\abc.gif", 25, 25, 0, 0) GUICtrlCreateLabel("Select one of following options", 30, 175) $button1 = GUICtrlCreateButton("Project 1", 25, 200, 150) $button2 = GUICtrlCreateButton("Project 2", 25, 235, 150) $button3 = GUICtrlCreateButton("Shutdown Current Project", 25, 270, 150) $button4 = Guictrlcreatebutton("Exit", 25, 305, 150) GUICtrlCreateTabItem("Setup1") GUICtrlCreateLabel("OTS PC Setup", 25, 25) GUICtrlCreateLabel("Model PC", 25, 50) GUICtrlCreateLabel("Eng PC", 25, 75) GUICtrlCreateLabel("HIS1 PC", 25, 100) GUICtrlCreateLabel("HIS2 PC", 25, 125) GUICtrlCreateLabel("HIS3 PC", 25, 150) GUICtrlCreateLabel("SIM1 PC", 25, 175) GUICtrlCreateLabel("SIM2 PC", 25, 200) GUICtrlCreateLabel("ITK PC", 25, 225) GUICtrlCreateLabel("VIEW PC", 25, 250) $pc1 = GUICtrlCreateInput("MDL0801", 85, 45, 90, 20) $pc2 = GUICtrlCreateInput("ENG0802", 85, 70, 90, 20) $pc3 = GUICtrlCreateInput("HIS0803", 85, 95, 90, 20) $pc4 = GUICtrlCreateInput("HIS0804", 85, 120, 90, 20) $pc5 = GUICtrlCreateInput("HIS0805", 85, 145, 90, 20) $pc6 = GUICtrlCreateInput("SIM0806", 85, 170, 90, 20) $pc7 = GUICtrlCreateInput("SIM0807", 85, 195, 90, 20) $pc8 = GUICtrlCreateInput("ITK0808", 85, 220, 90, 20) $pc9 = GUICtrlCreateInput("VIW0809", 85, 245, 90, 20) GUICtrlCreateTabItem("Setup2") GUICtrlCreateLabel("HIS & FCS Setup", 25, 25) GUICtrlCreateLabel(GUICtrlRead($pc2), 25, 50) GUICtrlCreateLabel(GUICtrlRead($pc3), 25, 75) GUICtrlCreateLabel(GUICtrlRead($pc4), 25, 100) GUICtrlCreateLabel(GUICtrlRead($pc5), 25, 125) GUICtrlCreateLabel(GUICtrlRead($pc6), 25, 150) GUICtrlCreateLabel(GUICtrlRead($pc7), 25, 250) GUICtrlCreateCombo("", 85, 45, 90) ; create first item GUICtrlSetData(-1, "HIS0164|HIS0165|HIS0167|HIS0168", "HIS0164") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 70, 90) ; create first item GUICtrlSetData(-1, "HIS0164|HIS0165|HIS0167|HIS0168", "HIS0165") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 95, 90) ; create first item GUICtrlSetData(-1, "HIS0164|HIS0165|HIS0167|HIS0168", "HIS0167") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 120, 90) ; create first item GUICtrlSetData(-1, "HIS0164|HIS0165|HIS0167|HIS0168", "HIS0168") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 145, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0801") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 170, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0802") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 195, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS8083") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 220, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0804") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 245, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0805") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 270, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0806") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 295, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0807") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 320, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0808") ; add other item snd set a new default GUICtrlCreateTabItem("Setup3") GUICtrlCreateLabel("HIS and FCS Setup", 25, 25) GUICtrlCreateLabel(GUICtrlRead($pc2), 25, 50) GUICtrlCreateLabel(GUICtrlRead($pc3), 25, 75) GUICtrlCreateLabel(GUICtrlRead($pc4), 25, 100) GUICtrlCreateLabel(GUICtrlRead($pc5), 25, 125) GUICtrlCreateLabel(GUICtrlRead($pc6), 25, 150) GUICtrlCreateLabel(GUICtrlRead($pc7), 25, 250) GUICtrlCreateCombo("", 85, 45, 90) ; create first item GUICtrlSetData(-1, "HIS0164|HIS0165|HIS0167|HIS0168", "HIS0164") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 70, 90) ; create first item GUICtrlSetData(-1, "HIS0164|HIS0165|HIS0167|HIS0168", "HIS0165") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 95, 90) ; create first item GUICtrlSetData(-1, "HIS0164|HIS0165|HIS0167|HIS0168", "HIS0167") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 120, 90) ; create first item GUICtrlSetData(-1, "HIS0164|HIS0165|HIS0167|HIS0168", "HIS0168") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 145, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0801") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 170, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0802") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 195, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS8083") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 220, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0804") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 245, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0805") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 270, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0806") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 295, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0807") ; add other item snd set a new default GUICtrlCreateCombo("", 85, 320, 90) ; create first item GUICtrlSetData(-1, "FCS0801|FCS0802|FCS0803|FCS0804|FCS0805|FCS0806|FCS0807|FCS0808", "FCS0808") ; add other item snd set a new default GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $button1 ShellExecute("psexec", "\\PC9 -u abc -p abc -i D:\project\model1.exe") Sleep(3000) ShellExecute("c:\program\BKETestFuncShutdown", "all") Sleep(45000) ShellExecute("C:\Program\BKETestFuncInit", "-j DEPRO -p HIS0164 -h PC5 -o -nd") Sleep(90000) ShellExecute("c:\program\BKETestFuncInit", "-j DEPRO -s FCS0101 -h PC5 -m -nd") Sleep(30000) Case $msg = $button2 ShellExecute("psexec", "\\PC9 -u abc -p abc -i D:\project\model2.exe") Sleep(3000) ShellExecute("c:\program\BKETestFuncShutdown", "all") Sleep(45000) ShellExecute("C:\Program\BKETestFuncInit", "-j SMM3 -p HIS0850 -h PC5 -o -nd") Sleep(90000) ShellExecute("c:\program\BKETestFuncInit", "-j SMM3 -s FCS0801 -h PC5 -m -nd") Sleep(3000) ShellExecute("c:\program\BKETestFuncInit", "-j SMM3 -s FCS0802 -h PC5 -m -nd") Sleep(3000) ShellExecute("c:\program\BKETestFuncInit", "-j SMM3 -s FCS0803 -h PC5 -m -nd") Sleep(3000) ShellExecute("c:\program\BKETestFuncInit", "-j SMM3 -s FCS0804 -h PC5 -m -nd") Sleep(3000) ShellExecute("c:\program\BKETestFuncInit", "-j SMM3 -s FCS0805 -h PC5 -m -nd") Sleep(3000) ShellExecute("c:\program\BKETestFuncInit", "-j SMM3 -s FCS0806 -h PC5 -m -nd") Sleep(30000) Case $msg = $button3 ShellExecute("psexec", "\\PC9 -u abc -p abc -i D:\project\model3.exe") Sleep(3000) ShellExecute("c:\program\BKETestFuncShutdown", "all") Sleep(30000) Case $msg = $button4 ExitLoop Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd
  19. Sorry, I got get what you mean "Check to see if you have used any GUICtrlSetData(-1, "a|b|c|d", "a") AFTER you created the checkbox." My 6th combo default is 'a' right? the 1st - 6th combo are having similar coding. GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 55, 90) p/s: I'm not IT expert....
  20. Here is my simplified version of my script. #include <GUIConstantsEx.au3> GUICreate("My GUI Tab", 200, 350) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 55, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 75, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 105, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 125, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 155, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 175, 90) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_MINIMIZE MsgBox(0, "", "Dialog minimized", 2) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd above is the simplified version of my script. In the orginal script, it has 4 tabs (1st tab with 4 button, 2nd tab with input, 3rd and 4th tab with combo similiar to script above). Furthermore, the select case is originally use for the 4 button is my 1st tab). The problem that I am facing is on the 6th combo, it doesn't show any 'value' which it supposed to show 'a' as default.
  21. I guess I said 'you solved my problem' too early... The 6th combo still not showing any default 'value' Sorry, I would like to repost my scritp again as I am using while loop at the end of the script. #include <GUIConstantsEx.au3> GUICreate("My GUI Tab", 200, 350) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 55, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 75, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 105, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 125, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 155, 90) GUICtrlSetData(-1, "a|b|c|d", "a") GUICtrlCreateCombo("", 85, 175, 90) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_MINIMIZE MsgBox(0, "", "Dialog minimized", 2) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd above is the simplified version of my script. In the orginal script, it has 4 tabs (1st tab with 4 button, 2nd tab with input, 3rd and 4th tab with combo similiar to script above). Furthermore, the select case is originally use for the 4 button is my 1st tab).
  22. Thank alot... you solved my problem! By the way, can you briefly explain why it happens (blank in combo)?
×
×
  • Create New...