Jump to content

File looping (HELP)


Recommended Posts

Hello Everyone,

Here is my code, it works perfectly but now I'm trying to have $test be changed after every loop. For example, I have this text file with a list of different part numbers and I want it to do all the steps in my script but instead of it doing it for SOT323.PRT every time I want the $test to be populated to "a New part from my text file" and loop thru all the parts. Note: there is like 400+ parts in this text file. Can someone help me with the last step so I can be finished? Thank you in advance!!!

AutoItSetOption('MouseCoordMode', 0)
AutoItSetOption('SendKeyDelay', 7)

Local $i = 1
Do
WinWait("Creo Parametric")
WinActivate("Creo Parametric")
sleep(2000)
MouseClick('primary', 1300, 292, 1, 0)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;This part of the code is for assigning a var to a part
;it stores the var then paste it into the search field and hits enter
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


$test = "SOT323.PRT"
ClipPut($test)
Send('^v')
Send("{ENTER}")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This part of the code executes in PDP and will show the results of
; the ClipPut ("Value") and will show the part in PDP
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sleep(4000)
WinWait("Creo Parametric")
WinActivate("Creo Parametric")
MouseClick('primary', 372, 595, 1, 0)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This part of the code executes in PDP and will click on the Action button
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sleep(4000)
WinWait("Creo Parametric")
WinActivate("Creo Parametric")
MouseClick('primary', 312, 366, 1, 0)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This part of the code executes in PDP and will click on the Action button, scroll
; down, right, enter then it will open in Creo and populate the 3D model
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sleep(5000)
Send('{DOWN}')
Send('{RIGHT}')
sleep(4000)
Send("{ENTER}")
Sleep(7000)
Send("{ENTER}")
Sleep(9000)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This part of the code executes in Creo and will click on the X button To
; Close the current window another way to do this is WinClose funtion
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


MouseClick('Primary', 610, 84, 1, 0)
Sleep(4000)
Send('{DOWN 4}')
Sleep(4000)
Send("{ENTER}")
WinWaitActive("Parameter Status",'')
Send("{ENTER}")
WinWaitActive("Parameter Status",'')
Send("{ENTER}")
Sleep(4000)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This part of the code executes in Creo and bring back the PDP search link
; Make sure to have MapKey created in Creo call it qq so when its called
; it will close the object in creo
;
; Another Mapkey that needs to be created is ss so it can bring up the PDP search
; site.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


WinWait("Creo Parametric")
WinActivate("Creo Parametric")
Send("qq")
Sleep(4000)
Send("ss")

;This will make it repeat til i reaches 3

$i = $i + 1
Until $i = 3 

 

Edited by JLogan3o13
Link to comment
Share on other sites

Try this:

AutoItSetOption('MouseCoordMode', 0)
AutoItSetOption('SendKeyDelay', 7)

Global $sParts = @ScriptDir & "\Parts.txt" ;~ String Variable pointing to Parts.txt file

    Global $aParts ;~ Array Variable
        _FileReadToArray($sParts, $aParts)

For $i = 1 To $aParts[0]
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    sleep(2000)
    MouseClick('primary', 1300, 292, 1, 0)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;This part of the code is for assigning a var to a part
    ;it stores the var then paste it into the search field and hits enter
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ClipPut($aParts[$i])
    Send('^v')
    Send("{ENTER}")
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will show the results of
    ; the ClipPut ("Value") and will show the part in PDP
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    sleep(4000)
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    MouseClick('primary', 372, 595, 1, 0)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will click on the Action button
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    sleep(4000)
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    MouseClick('primary', 312, 366, 1, 0)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will click on the Action button, scroll
    ; down, right, enter then it will open in Creo and populate the 3D model
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    sleep(5000)
    Send('{DOWN}')
    Send('{RIGHT}')
    sleep(4000)
    Send("{ENTER}")
    Sleep(7000)
    Send("{ENTER}")
    Sleep(9000)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in Creo and will click on the X button To
    ; Close the current window another way to do this is WinClose funtion
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     

    MouseClick('Primary', 610, 84, 1, 0)
    Sleep(4000)
    Send('{DOWN 4}')
    Sleep(4000)
    Send("{ENTER}")
    WinWaitActive("Parameter Status",'')
    Send("{ENTER}")
    WinWaitActive("Parameter Status",'')
    Send("{ENTER}")
    Sleep(4000)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in Creo and bring back the PDP search link
    ; Make sure to have MapKey created in Creo call it qq so when its called
    ; it will close the object in creo
    ;
    ; Another Mapkey that needs to be created is ss so it can bring up the PDP search
    ; site.
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    Send("qq")
    Sleep(4000)
    Send("ss")

    ;This will make it repeat til i reaches 3
Next

 

Edited by Subz
Link to comment
Share on other sites

I tried it doesn't seem to work. my text file location is in "C:\Users\rmedina\Documents\" both my script and my txt file. Idk if I'm doing something wrong but also it doesn't to like the _FileReadToArray($sParts, $aParts)

I tried fixing the problem myself but doesn't seem to work with anything I do. Also, thank you for helping

 

2017-06-28_11-26-27.jpg

2017-06-28_11-29-26.jpg

Link to comment
Share on other sites

  • Developers
2 minutes ago, Rmedina4 said:

but also it doesn't to like the _FileReadToArray($sParts, $aParts)

Check the helpfile for the proper #include file to add which is currently missing in the code.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

@Rmedina4 you will make it much easier for us to help you if you post files, not pictures. That way we can duplicate your efforts, without having to retype a bunch of text.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

I meant the text file you are pulling from. For code, in the future, just use the code tags <> when you post. I updated your first post so you can see how it looks.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Developers

... and your script is trying to read it from the directory the script is located in.... right?  Is that correct?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

@Rmedina4 based on the script file you uploaded, you have this line:

Global $sParts = @ScriptDir & "C:\Users\rmedina\Documents\Symbol-look-with-prt.txt"

Try doing this, and you will see why that line is your problem:

ConsoleWrite(@ScriptDir & "C:\Users\rmedina\Documents\Symbol-look-with-prt.txt" & @CRLF)

 

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

#include <File.au3>
#include <Array.au3>

AutoItSetOption('MouseCoordMode', 0)
AutoItSetOption('SendKeyDelay', 7)

;Global $sParts = @ScriptDir & "C:\Users\rmedina\Documents\Symbol-look-with-prt.txt" ;~ String Variable pointing to Parts.txt file
ConsoleWrite(@ScriptDir & "C:\Users\rmedina\Documents\Symbol-look-with-prt.txt" & @CRLF)
    Global $aParts ;~ Array Variable
        _FileReadToArray($sParts, $aParts)

For $i = 1 To $aParts[0]
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    sleep(2000)
    MouseClick('primary', 1300, 292, 1, 0)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;This part of the code is for assigning a var to a part
    ;it stores the var then paste it into the search field and hits enter
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ClipPut($aParts[$i])
    Send('^v')
    Send("{ENTER}")
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will show the results of
    ; the ClipPut ("Value") and will show the part in PDP
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    sleep(4000)
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    MouseClick('primary', 372, 595, 1, 0)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will click on the Action button
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    sleep(4000)
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    MouseClick('primary', 312, 366, 1, 0)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will click on the Action button, scroll
    ; down, right, enter then it will open in Creo and populate the 3D model
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    sleep(5000)
    Send('{DOWN}')
    Send('{RIGHT}')
    sleep(4000)
    Send("{ENTER}")
    Sleep(7000)
    Send("{ENTER}")
    Sleep(9000)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in Creo and will click on the X button To
    ; Close the current window another way to do this is WinClose funtion
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    MouseClick('Primary', 610, 84, 1, 0)
    Sleep(4000)
    Send('{DOWN 4}')
    Sleep(4000)
    Send("{ENTER}")
    WinWaitActive("Parameter Status",'')
    Send("{ENTER}")
    WinWaitActive("Parameter Status",'')
    Send("{ENTER}")
    Sleep(4000)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in Creo and bring back the PDP search link
    ; Make sure to have MapKey created in Creo call it qq so when its called
    ; it will close the object in creo
    ;
    ; Another Mapkey that needs to be created is ss so it can bring up the PDP search
    ; site.
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    Send("qq")
    Sleep(4000)
    Send("ss")

Next

Error:

2017-06-28_13-22-24.jpg

Link to comment
Share on other sites

You followed JLogan3013's suggestion, but you apparently didn't study the output very carefully. It's right here:

21 minutes ago, Rmedina4 said:

Global $sParts = @ScriptDir & "C:\Users\rmedina\Documents\Symbol-look-with-prt.txt"

The macro (@scriptDir) already produces the entire path, and then you immediately append drive and path again, which obviously won't yield a valid location. I guess JLo was hoping you would discover this when writing it out to console (it's one line above the error message in your last screen capture).:( So re-enable the $sParts declaration (commented out in last example), and either use macro "\" & filename or supply the full path+filename yourself, but not both.;)

Edited by RTFC
Link to comment
Share on other sites

is there a way for me to activate this window even though the name will be changed every time when it loops to a new part? I'm trying to click the edit button.  this takes place in the  "click on edit then click del entire FT, press enter" section of the code

#include <File.au3>
#include <Array.au3>
#RequireAdmin
AutoItSetOption('MouseCoordMode', 0)
AutoItSetOption('SendKeyDelay', 7)

Global $sParts = @ScriptDir & "\Symbol-look-with-prt.txt" ;~ String Variable pointing to Parts.txt file

   Global $aParts ;~ Array Variable
        _FileReadToArray($sParts, $aParts)

For $i = 1 To $aParts[0]
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    sleep(2000)
    MouseClick('primary', 1300, 292, 1, 0)

    ;****************************************************************************************
    ;This part of the code is for assigning a var to a part
    ;it stores the var then paste it into the search field and hits enter
    ;
    ;****************************************************************************************

    ClipPut($aParts[$i])
    Send('^v')
    Send("{ENTER}")

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will show the results of
    ; the ClipPut ("Value") and will show the part in PDP
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    sleep(9000)
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    MouseClick('primary', 372, 595, 1, 0)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will click on the Action button
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    sleep(9000)
    WinWait("Creo Parametric")
    WinActivate("Creo Parametric")
    MouseClick('primary', 312, 366, 1, 0)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in PDP and will click on the Action button, scroll
    ; down, right, enter then it will open in Creo and populate the 3D model
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    sleep(9000)
    Send('{DOWN}')
    Send('{RIGHT}')
    sleep(9000)
    Send("{ENTER}")
    Sleep(7000)
    Send("{ENTER}")
    Sleep(9000)

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in Creo and will click on the X button To
    ; Close the current window another way to do this is WinClose funtion
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    MouseClick('Primary', 610, 84, 1, 0)
    Sleep(9000)
    Send('{DOWN 4}')
    Sleep(9000)
    Send("{ENTER}")
    WinWaitActive("Parameter Status",'')
    Send("{ENTER}")
    WinWaitActive("Parameter Status",'')
    Send("{ENTER}")
    Sleep(9000)
    WinWait("[CLASS:Dialog]")
    WinActivate ("[CLASS:Dialog]")
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; This part of the code executes in Creo and bring back the PDP search link
    ; Make sure to have MapKey created in Creo call it qq so when its called
    ; it will close the object in creo
    ;
    ; Another Mapkey that needs to be created is ss so it can bring up the PDP search
    ; site.
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    ; tools --> FT

    MouseClick('Primary', 479, 53, 1, 0)
    WinWait("[CLASS:Dialog]")
    WinActivate ("[CLASS:Dialog]")
    MouseClick('Primary', 541, 102, 1, 0)
    ; click on edit then click del entire FT, press enter
    WinWaitActive("[CLASS:Dialog]")
    MouseClick('Primary', 671, 206, 1, 0)
    Send('{DOWN 13}')
    Sleep(9000)
    Send("{ENTER}")
Sleep(9000)
    ;confirm del of FT
    WinWait("Confirm")
    WinActivate("Confirm")
    MouseClick('Primary', 927, 430, 1, 0)
    Sleep(9000)

    ;empty FT window clicking ok button
    WinWaitActive("[CLASS:Dialog]")
    MouseClick('Primary', 1193, 605, 1, 0)
    Sleep(9000)

   ; nv tool tab
   WinWaitActive("[CLASS:Dialog]")
    MouseClick('Primary', 122, 53, 1, 0)
Sleep(9000)


; this part is for the "Generate family table Columns"

    MouseClick('Primary', 610, 84, 1, 0)
    Sleep(9000)
    Send('{DOWN}')
    Sleep(9000)
    Send("{ENTER}")
    Sleep(9000)

;autoload data
MouseClick('Primary', 610, 84, 1, 0)
    Sleep(9000)
    Send('{DOWN 2}')
    Sleep(9000)
    Send("{ENTER}")
    Sleep(9000)

; tools--> FT
MouseClick('Primary', 479, 53, 1, 0)
    WinWait("[CLASS:Dialog]")
    WinActivate ("[CLASS:Dialog]")
    MouseClick('Primary', 541, 102, 1, 0)

Sleep(9000)
; click ok on open FT window

WinWait("[CLASS:Dialog]")
WinActivate ("[CLASS:Dialog]")
MouseClick('Primary', 1443, 603, 1, 0)
sleep(9000)


;close object window
    Send("qq")
    Sleep(9000)
; open up the PDP search window
    Send("ss")

Next

Thank you in advance! 

2017-06-29_11-09-29.jpg

Link to comment
Share on other sites

The basic window info will change every time

Example since CAP_SMD_3528.PRT is the part pulled from the text file 

the new part after it loops will be SOT_232.PRT is there a way I can use the name pulled from the text file but for it to not include the .PRT 

 

Every time this window open up the basic window info will be 

Title: Family Table: Part name without the .PRT

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...