Questions tagged [tell]

37 questions
1
vote
0 answers

Where to find the a list of all application name available for tell application apple script?

For example in the tutorial here tell application "Finder" Finder is an app in my system. Terminal as well. However, if I replace Terminal with iTerm which is also an App named like that in my applications list, it wouldn't work. Even it is shown in…
ey dee ey em
  • 7,991
  • 14
  • 65
  • 121
1
vote
1 answer

Python issue with tracking continuously updated log file

I am trying to track a log file that is being created by another running program. I would like to return True if the word 'day' is in found in the updated log (which means the code other has run successfully). The problem is- sometimes the other…
1
vote
2 answers

Best way to use: tell application "System Events"

I was thinking about what is the best way to use this statement for GUI Scripting: tell application "System Events" There is any difference with tell application "System Events" tell process "Finder" -- do something with the GUI end…
user3059415
  • 35
  • 1
  • 6
1
vote
1 answer

What exactly does tell() return, and how do I use it to calculate percent of file read?

I am using Python 2.7 on Windows, and I am very new to Python so forgive me if this is an easy one. Everything that I have read says that tell() returns the "position", which I believe is basically the cursor position that we are currently at in the…
Blair Connolly
  • 584
  • 2
  • 7
  • 21
1
vote
2 answers

python, seek, tell, read. Reading lines from giant csv file

I have a giant file (1.2GB) of feature vectors saved as a csv file. In order to go through the lines, I've created a python class that loads batches of rows from the giant file, to the memory, one batch at a time. In order for this class to know…
user1456524
  • 11
  • 1
  • 2
0
votes
1 answer

Text file incorrect tell() positions

Trying to index text file (formatted as one sentence per line) ... but the character positions seem to get skewed at some point ... in the example below this happen at line/sentence 19. First I check to find the positions and then I read the same…
sten
  • 7,028
  • 9
  • 41
  • 63
0
votes
1 answer

Python: scan file for substring, save position, then return to it

I'm writing a script that needs to scan a file until it finds the line at which a substring occurs, save the position of the beginning of that line, then return to it later. I'm very new to python, so I've not had much success yet. Here is my…
Kronimiciad
  • 190
  • 1
  • 2
  • 11
0
votes
1 answer

a strange result in python using open function with a+ mode

My question is about Python build-in open function with a+ mode. First, from this thread, I know for a+ mode, subsequent writes to the file will always end up at the current end of file. I write the following simple program to confirm this…
0
votes
1 answer

(Python 3) I have some questions regarding seek() and tell()

I am currently learning Python 3 with the Zed Shaw's book, Learning Python 3 The Hard Way. When doing exercise 20 about functions and files, you get tasked with researcher what does the seek function does. By searching online I've come across with a…
0
votes
3 answers

download using wget in perl

New to Perl, hope someone could kindly explain the following questions related to this code: $url ="some url"; open FH, "wget -q -O- $url|" or die; while(){ ... } what does the the second - in -O- mean? what does the | in $url |…
user685275
  • 2,097
  • 8
  • 26
  • 32
0
votes
1 answer

How can I send event from my ActorRef to all created children with akka fsm?

I'm using AKKA fsm with java. I'm trying to send message to all the children ever created by my actorRef. Lets say for event X my actorRef create new FSM, but didn't save it in a struct. and for event Y I would like to send this event to all my…
0
votes
3 answers

C equivalent to applescript "tell X to open Y"

Does anybody have a C library function that does the equivalent of AppleScript "Tell application X to open Y"? I'm not using cocoa, just plain old C, and ideally I would like to be able to do this from a commandl ine application that has no GUI…
Joymaker
  • 813
  • 1
  • 9
  • 23
0
votes
1 answer

How to use if in applescript

I'm making a game application in AppleScript. But when I was done it said this "Expected end of line but found ":".". The code I used was display alert "By taping ok you accept the following rules: Do not hack, do not cheat, edit komponents or…
0
votes
1 answer

How to generate a file by reading its name in SWI-Prolog?

I'm writting a swi-prolog program which reads a file name, opens it, and write some stuff. main :- read(FileName), tell(FileName), write("Some stuff"), told. It works, but I must put the name of the file as '«name».«type»',…
sant016
  • 195
  • 1
  • 2
  • 14
0
votes
1 answer

Hiding and Unhiding Individual Files Using Applescript

I need to write an applescript to hide and unhide specific files. This is what I have so far, but apparently the spaces in the file name is causing problems. tell application "System Events" do shell script "chflags nohidden…
Sharky
  • 13
  • 2