Thursday, July 19, 2018

#1 2011-02-08 09:20:13 pm

AudialRedux
Member
Registered: 2010-12-08
Posts: 45

Progress Bar Problem!

this is the only part i need help with i want the progress bar to move plus change text

Applescript:


set contents to 4
-- This Not Working Below!!
set contents of text feild "ffmpeg" to "/ffmpeg"
-- THAT PART ^^^^^^^
delay 1.0
set contents to 100

Offline

 

#2 2011-02-09 02:12:58 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11499
Website

Re: Progress Bar Problem!

Hi,

in AppleScript Studio all UI elements must be fully referenced

Applescript:


set contents of text field "ffmpeg" of window "whatever" to "/ffmpeg"


regards

Stefan

Offline

 

#3 2011-02-10 05:30:51 am

DJ Bazzie Wazzie
Member
From:: the Netherlands
Registered: 2004-10-20
Posts: 2777
Website

Re: Progress Bar Problem!

If you're saying that set contents to 4 is working then you misses the tell block around it to post that here.

probably something like this.

Applescript:

tell window "windowname"
tell progress indicator "progress"
set contents to 4
--here your set contents of text field doesn't work because you're scoping is set to the indicator
end
--if you place it here it would work
set contents of text feild "ffmpeg" to "/ffmpeg"
tell progress indicator
set contents to 100
end tell
end

a more nicer piece of code would be

Applescript:

tell window "windowname"
set contents of progress indicator "progress" to 1
set contents of text feild "ffmpeg" to "/ffmpeg"
set contents of progress indicator "progress" to 100
end

use a tell block for multi line code to an object (in this case the window) and for single line commands to an object don't use a tell block.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)