New to AppleScript - GUI script issue..

I have a 3rd party software package that i am trying to automate, i can get the program to start but i have a problem selecting the ok button in the program, hence the GUI script.

tell application “Finder”
open file “Financials_server” of folder “Financials_Server” of folder “SapphireOne” of folder “Applications” of startup disk
end tell
delay 7
tell application “System Events”
tell process “4D Server”
tell window “Welcome”
select button “OK”
end tell
end tell
end tell

The problem is that it opens the program, but Doesnt do anything, UI element inspector shows the following

<AXApplication: “4D Server”>
<AXWindow: “Welcome”>
<AXButton: “OK”>

AXRole: “AXButton”
AXRoleDescription: “button”
AXChildren: “<array of size 0>”
AXParent: “<AXWindow: “Welcome”>”
AXTitle: “OK”
AXWindow: “<AXWindow: “Welcome”>”
AXPosition: “x=646 y=649”
AXSize: “w=96 h=20”
AXEnabled: “1”

AXPress - press

any help would be appreciated, thanks.

I’m not sure if this will work, I do not own the application you are scripting. If the “OK” button is a default button – most OK buttons are – then you might be able to do something like…

tell process "4D Server" 
tell application "System Events" to keystroke return
end tell

hey, thanks for the help, it works fine now, much appreciated!!

Problem solved already (and solution yoinked! :-)), but just for my information since the action was described as “press”, would “press button ok” work, instead of the current “select button ok”?