Vorheriges Thema anzeigen :: Nδchstes Thema anzeigen |
Autor |
Nachricht |
ShooTerKo --->
![---> --->](/phpBB2/images/ranks/ranki2.gif)
![](images/avatars/15370576074421091a38d84.jpg)
Anmeldedatum: 21.03.2006 Beitrδge: 221 Wohnort: Hamburg
|
Verfasst am: 08.05.2007 - 10:51 Titel: Objective-C Calls in Applescript |
|
|
So, ich habe mich mal etwas schlau gemacht und ein bisschen mit Objective-C bzw. Cocoa-Strings herumgespielt:
VIEL SPASS!
(*
Ein paar Beispiele von String-Handlern in Applescript
Der tell application "Automator"-Block ist nur notwendig fόr das Scripten
im ScriptEditor und entfδllt beim Scripten in Applescript Studio (Xcode)
Weitere Informationen zum call method() Handler
http://developer.apple.com/documentation/AppleScript/Conceptual/StudioBuildingApps/chapter04/chapter_4_section_2.html#//apple_ref/doc/uid/20001251-TPXREF175
Weitere Mφglichkeiten zur NSString-Klasse unter
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html
Klassenmethoden (zu erkennen am + vor der Signatur) werden mit
of class "NSString"
aufgerufen und geben einen neu erzeugten String
Bei Aufruf von Funktionen mit Parametern muί der Doppelpunkt mitgeschrieben werden, und die Parameter als Liste mit όbergeben werden z.B.
call method "stringByAppendingPathComponent:" of "~/Library/" with parameters {"Application Support"}
*)
--
-- Verδndern der Groί- und Kleinschreibung
--
-- Alles Groίbuchstaben (uppercase)
set foo to "The quick brown fox jumps over the lazy dog."
tell application "Automator"
set uppercasedString to call method "uppercaseString" of foo
end tell
-- Alles Kleinbuchstaben (lowercase)
set foo to "The quick brown fox jumps over the lazy dog."
tell application "Automator"
set lowercasedString to call method "lowercaseString" of foo
end tell
-- Kapitalisieren (capitalize)
set foo to "The quick brown fox jumps over the lazy dog."
tell application "Automator"
set capitalizedString to call method "capitalizedString" of foo
end tell
--
-- Arbeiten mit Pfaden
--
-- Tilde (~) auflφsen
set foo to "~/Library/Application Support"
tell application "Automator"
set fullPathString to call method "stringByExpandingTildeInPath" of foo
end tell
-- Tilde (~) wieder hineinrechnen
set foo to POSIX path of (path to desktop folder)
tell application "Automator"
set pathStringWithTilde to call method "stringByAbbreviatingWithTildeInPath" of foo
end tell
-- Parent-Folder holen
set foo to "~/Library/Application Support"
tell application "Automator"
set parentPath to call method "stringByDeletingLastPathComponent" of foo
end tell
-- Pfad um Komponente erweitern
set foo to "~/Library/"
tell application "Automator"
set deeperPath to call method "stringByAppendingPathComponent:" of foo with parameters {"Application Support"}
end tell
-- Pfadkomonenten als Liste holen
set foo to "~/Library/Application Support"
tell application "Automator"
set foo to call method "stringByExpandingTildeInPath" of foo
set pathComponentsList to call method "pathComponents" of foo
end tell
-- Mehrere Pfade gleichzeitig bauen
set foo to "/Applications"
set fooList to {"Utilities/Terminal.app", "iTunes.app", "Dictionary.app"}
tell application "Automator"
set pathList to call method "stringsByAppendingPaths:" of foo with parameters {fooList}
end tell
-- einen kompletten Pfad bauen
set fooList to {"Applications", "Utilities", "Terminal.app"}
tell application "Automator"
set theNewPath to call method "pathWithComponents:" of class "NSString" with parameters {fooList}
end tell
--
-- Arbeiten mit URLs
--
-- eine URL encoden
set foo to "http://www.spiegel.de/δφό"
tell application "Automator"
set theNewPath to call method "stringByAddingPercentEscapesUsingEncoding:" of foo with parameter 5
--> ergibt "http://www.spiegel.de/%E4%F6%FC"
end tell
-- eine URL decoden
tell application "Automator"
set theNewestPath to call method "stringByReplacingPercentEscapesUsingEncoding:" of "http://www.spiegel.de/%E4%F6%FC" with parameter 5
--> ergibt "http://www.spiegel.de/δφό"
end tell
(*
NSASCIIStringEncoding = 1,
NSNEXTSTEPStringEncoding = 2,
NSJapaneseEUCStringEncoding = 3,
NSUTF8StringEncoding = 4,
NSISOLatin1StringEncoding = 5,
NSSymbolStringEncoding = 6,
NSNonLossyASCIIStringEncoding = 7,
NSShiftJISStringEncoding = 8,
NSISOLatin2StringEncoding = 9,
NSUnicodeStringEncoding = 10,
NSWindowsCP1251StringEncoding = 11,
NSWindowsCP1252StringEncoding = 12,
NSWindowsCP1253StringEncoding = 13,
NSWindowsCP1254StringEncoding = 14,
NSWindowsCP1250StringEncoding = 15,
NSISO2022JPStringEncoding = 21,
NSMacOSRomanStringEncoding = 30,
NSProprietaryStringEncoding = 65536
*)
Vielleicht kφnnen wir ja so nach und nach tolle Funktionalitδten von call method hier hineinstellen, ich denke, dass es da noch seeeehr viel zu entdecken gibt!
Viele Grόίe,
ShooTerKo _________________ "It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
iScript ---->
![----> ---->](/phpBB2/images/ranks/ranki3.gif)
![](images/avatars/186413132441e503f123ad.png)
Anmeldedatum: 29.03.2001 Beitrδge: 1116
|
Verfasst am: 15.05.2007 - 07:55 Titel: |
|
|
das ist mir irgendwie 'ne nummer zu hoch. wie wόrde man soetwas denn umsetzen:
replaceOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(unsigned)opts range:(NSRange)searchRange _________________ - anholn deit kriegen - |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
samowitsch ->
![-> ->](/phpBB2/images/ranks/ranki0.gif)
Anmeldedatum: 17.01.2009 Beitrδge: 3
|
Verfasst am: 17.01.2009 - 23:56 Titel: |
|
|
Hallo, bin όber diesen sehr interessanten Thread gestolpert. In einem eigenen Projekt habe ich eine Suchen/Ersetzen Funktion benφtigt und habe mir stringByReplacingOccurrencesOfString:withString: genauer angeschaut. Wollte dieses Snippet diesem Thread zukommen lassen
Zitat: | tell application "Automator"
set resultstring to call method "stringByReplacingOccurrencesOfString:withString:" of sourcestring with parameters {searchstring, replacestring}
end tell |
Sind diese Cocoa Methoden nur όber Automator ansprechbar oder gibt es da noch eine andere Lφsung? Ich finde es lδstig wenn parallel immer Automator aufpoppt.
Beste Grόίe
samowitsch |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
samowitsch ->
![-> ->](/phpBB2/images/ranks/ranki0.gif)
Anmeldedatum: 17.01.2009 Beitrδge: 3
|
Verfasst am: 18.01.2009 - 21:08 Titel: |
|
|
samowitsch hat Folgendes geschrieben: | ..... Sind diese Cocoa Methoden nur όber Automator ansprechbar oder gibt es da noch eine andere Lφsung? Ich finde es lδstig wenn parallel immer Automator ........ |
Jetzt kann ich mir gleich selber Antworten. Innerhalb eines XCode Applescript Studio Projekts kφnnen die Cocoa Klassen direkt und ohne einen "tell app ...." Block angesprochen werden.
Ciao |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
samowitsch ->
![-> ->](/phpBB2/images/ranks/ranki0.gif)
Anmeldedatum: 17.01.2009 Beitrδge: 3
|
Verfasst am: 03.02.2009 - 15:03 Titel: |
|
|
Und hier noch einer:
Code: |
set splitStringList to call method "componentsSeparatedByString:" of sourceString with theDelimiter
|
Eine Cocoa Klasse δhnlich PHP > Explode oder den AppleScript's text item delimiters.
Konnte aber noch nicht vergleichen was schneller ist die Cocoa Klasse oder die AppleScript's text item delimiters |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
jiuer7845 ---->
![----> ---->](/phpBB2/images/ranks/ranki3.gif)
Anmeldedatum: 06.04.2021 Beitrδge: 521
|
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
jiuer7845 ---->
![----> ---->](/phpBB2/images/ranks/ranki3.gif)
Anmeldedatum: 06.04.2021 Beitrδge: 521
|
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
jiuer7845 ---->
![----> ---->](/phpBB2/images/ranks/ranki3.gif)
Anmeldedatum: 06.04.2021 Beitrδge: 521
|
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
jiuer7845 ---->
![----> ---->](/phpBB2/images/ranks/ranki3.gif)
Anmeldedatum: 06.04.2021 Beitrδge: 521
|
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
FrankJScott Gast
|
Verfasst am: 09.09.2022 - 12:08 Titel: Recommended SEO Service Details |
|
|
To the lady talking about seo design,free backlink provider,free ping backlinks,website and app development,seo management services,top web design companies,seo link profile,list of profile creation website,seo and social media,white hat link building strategies,backlink hut,custom web design company,competitor backlink analysis,seo for dentists,off page link building,site redesign,best profile creation site,buy backlinks forum,education backlinks, I suggest this recommended website services for improved seo rankings for high domain authority profile creation sites,high authority backlinks list 2021,improve seo,linkbacks seo,high authority backlinks,seo joomla,backlinko on page seo,white label seo company,web 2.0 profile creation,spammy links,seo digital company,awr seo,seofrog,e commerce web design,gotch seo backlinks,profile creation sites,seo outsourcing,top backlinks sites,seo autopilot,wordpress website development company,also. See More Top SEO Service TipsSite 7447b4a
Zuletzt bearbeitet von FrankJScott am 30.09.2022 - 21:29, insgesamt einmal bearbeitet |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
FrankJScott Gast
|
Verfasst am: 29.09.2022 - 22:02 Titel: Recommended Dog Behaviour TipsSite |
|
|
To the lady asking about dog behaviour with other dogs, unusual behaviour in dogs, german shepherd husky mix training tips, dachshund training tips, 10 month old staffy behaviour, 4 month old puppy behaviour, I highly recommend this top dog training forum or nesting dog behavior, sheltie training tips, female dogs aggressive behavior, best methods for potty training puppies, german shepherd behaviour problems, leash walking tips, on top of this new dog training forum as well as dog aggressive play behavior, english bulldog training tips, border collie puppy training tips, tips to stop dog barking, boxer dog tips and secrets, aggressive dog behaviour towards other dogs, alongside all this recommended dog behaviour site which is also great. Also have a look at this high rated dog behaviour url not to mention gsp dog training tips, prong collar tips, brandon mcmillan dog training tips, boxer dog behaviour, training tips for biting puppies, teenage puppy behavior, and don't forget this excellent dog training url as well as tips for training husky puppy, yorkie poo potty training tips, tips to get puppy to stop biting, yorkie poo potty training tips, spaniel behaviour, pinch collar training tips, alongside all high rated dog training tips which is also worth a look. I also suggest this top rated dog behaviour info and don't forget dog obedience training tips, cesar millan puppy training tips, cocker spaniel puppy behaviour, avoidance behaviour in dogs, best behaviour dog training services, rottweiler potty training tips, not to mention this new dog behaviour url not to mention 12 month old puppy behavior, spaniel behaviour, cavalier training tips, springer spaniel behavior problems, pet dog behaviour, dachshund training tips, as well as excellent dog training forumand don't forget rottweiler potty training tips, shih tzu behavior, retriever training tips, golden cocker spaniel behaviour problems, canine behavior training, alpha beta dog pack behavior, which is also great. Finally, have a look at this high rated dog behaviour tips for good measure. Check more New Consulting Agency TipsSite 30ae3a7 |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
FrankJScott Gast
|
Verfasst am: 04.10.2022 - 14:19 Titel: Best Air Quality Info |
|
|
For the person talking about heat pump emergency heat, geothermal service near me, dons heating, bell heating and cooling, commercial hvac contractors near me, all comfort heating and cooling, I highly recommend this high rated air duct cleaning advice or byrum heating and air, central heating and air, bloomingdale heating and air, folkes heating, emergency heat, plumbing and heating services, alongside all this new ac installation & replacement advice and don't forget oil heating system, heating ducts, comfort air heating & cooling, mini split heating and cooling system, mobile home heating and cooling, air on heating, not to mention this top rated boiler repair & replacement advice which is also great. Also have a look at this top rated indoor air quality tips alongside all furnace technician, heating & cooling service, local central heating engineers, hvac maintenance, airmax heating and cooling, all star heating and air, as well as this excellent heat pump installation & replacement url not to mention lba heating and cooling, zoned heating system, hvac installer near me, express heating and air, geothermal contractors near me, ground heating system, as well as useful air duct cleaning site which is also worth a look. I also suggest this useful ac repair & maintenance advice alongside all ducted heating system, cool care heating and air, furnace repair company, emergency heating engineer, mini split heating and cooling system, heat pump repairs near me, alongside all this excellent ac repair & maintenance advice and don't forget emergency heating repair, geothermal installation, heating engineers, amana heating and cooling, mobile home furnace repair near me, best heating and air conditioning, as well as top rated cooling url on top of carrier heating and air, arc heating, all star heating, ideal boiler repair, split heating system, gills plumbing, which is also great. Finally, have a look at this great mini split ac installation & replacement details for good measure. Check more Recommended SEO Service TipsSite ae3a744 |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
FrankJScott Gast
|
Verfasst am: 07.11.2022 - 23:07 Titel: Great Cooling Info |
|
|
In response to the lady asking about huft heating and air, heating cooling near me, american standard heating and cooling, air source heat pump engineers near me, gas heater installation, mini split maintenance, I highly recommend this best heating service advice or campbells heating and air, heating and air companies, ductless heating and cooling systems, commercial hvac contractors, air on heating, emergency gas engineer, on top of this high rated air quality service blog not to mention central heating, warm air heating engineers near me, eco heating and cooling, hutzel plumbing, emergency heating and cooling, ductwork cleaning near me, and don't forget this recommended air quality service site which is also great. also have a look at this high rated air quality service site on top of plumbing and heating contractors near me, mckay plumbing, air conditioner repair near me, commercial hvac companies, emergency boiler repair, split heating system, alongside all this best cooling service link as well as electric furnace, boiler heating system, pardee heating and air, tjs plumbing, heating and air repair near me, brennan heating and air, as well as updated cooling service link which is also worth a look. i also suggest this new heating service site not to mention heating and cooling repair services near me, heat pump servicing, electric heating engineer near me, randazzo's heating and cooling, heating cooling near me, all service heating and air, and don't forget this updated heating service tips alongside all heat exchanger repair, home heating and air, installing a heat pump in an existing home, heater repair, central heating engineer, heating company, on top of great air quality service link alongside all hydronic radiant floor heating system, boiler maintenance near me, goyette heating and cooling, radiant heating and cooling, family hvac, furnace installation near me, which is also great. finally, have a look at this useful cooling service blog with anthony's heating and cooling, apex hvac, emergency hvac, campbells heating and air, furnace cleaning, geothermal heating system, for good measure. |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
FrankJScott Gast
|
Verfasst am: 08.11.2022 - 21:17 Titel: Monitors For Graphic Design |
|
|
In response to the guy talking about best lenovo laptop for graphic design, best wacom cintiq 16 vs ipad pro, razer blade for graphic design, best graphic design laptops 2022, laptop for graphic design beginners, best canon eos 4000d review, I highly recommend this cheap personal laptop for graphic design advice or canon eos4000d review, cheap ipad pro vs cintiq, best laptop for graphic arts, laptop graphic design, best hp laptop for graphics, laptop for graphic design and animation, not to mention this good personal laptop for graphic design blog on top of top laptops for graphic design, top laptop for graphic design 2022, most popular nikon coolpix b500 16mp review, laptop specs for graphic design 2022, best laptop configuration for graphic design, laptops for graphic designers, and don't forget this good personal laptop for graphic design blog which is also great. also have a look at this most popular personal laptop for graphic design advice on top of best canon powershot 180 review, laptop specs for graphic design and video editing, best laptop for graphic design reddit, entry level graphic design laptop, good laptop for graphic design 2022, top laptops for designers, not to mention this best personal laptop for graphic design tips as well as cheap monitors for graphic designers, cheap nikon - coolpix b500 16.0-megapixel digital camera reviews, top 10 laptops for graphic designers, touchscreen laptop for graphic design, good coolpix b500 digital camera reviews, good budget laptop for graphic design, alongside all affordable personal laptop for graphic design info which is also worth a look. i also suggest this good personal laptop for graphic design info alongside all best laptop for computer graphics, macbook pro 2022 for graphic design, best touch screen laptop for graphic design, best apple macbook for graphic design, best laptop for programming and graphic design, best laptop for professional graphic design, alongside all this cheap personal laptop for graphic design blog as well as affordable canon powershot sx540 hs tips and tricks, chromebook for graphic design, affordable coolpix b500 digital camera reviews, most popular canon eos 4000d reviews, laptop for creative work, best macbook specs for graphic design, not to mention budget personal laptop for graphic design advice as well as best laptop screen for graphic design, best most popular fonts for graphic designers, best font websites for graphic designers, laptops that are good for graphic design, best laptop for graphic design, laptop for graphic design specs, which is also great. finally, have a look at this budget personal laptop for graphic design advice with good laptops for design work, coolpix b500 digital camera reviews, asus graphic design, best budget laptop for graphic design, cheap mac for graphic design 2022, cheap canon eos4000d review, for good measure. |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
FrankJScott Gast
|
Verfasst am: 20.11.2022 - 19:44 Titel: Awesome Bandar Bola Details |
|
|
In response to the man talking about sbobet888 togel, agen sbobet88 terpercaya, agen sbobet123, efootball sbobet, sbobet, judi bola online24jam terpercaya, I highly suggest this great judi bola details or best pirate game on mobile, www sbobet88888 com mobile, situs judi bola online24jam terpercaya 2021, daftar sbobet88 mobile, sbobet football online, best seats on emirates 777-200lr, not to mention this great bandar judi bola tips on top of sbobet888 togel, sbobet asia daftar, sbobet asian handicap live odds, efootball sbobet, west ham sbobet kit, sbobet asia, on top of this recommended bandar bola tips which is also great. also have a look at this top bandar judi bola forum not to mention agen judi bola deposit pulsa tanpa potongan, situs judi bola 88, hukum judi bola di indonesia, agen sbobet188, best scooter for food delivery uk, judi bola online24jam terpercaya, alongside all this top rated situs judi bola blog as well as sbobet88 asia game slot, sbobet88 asia, agen sbobet88 terpercaya, daftar sbobet188, situs judi bola deposit pulsa tanpa potongan, daftar akun sbobet88, not to mention awesome tunasbola details which is also worth a look. i also recommend this recommended situs judi bola advice alongside all judi bola deposit pulsa, sbobet88 login slot, how to login to entrust, agen sbobet terbaik, sbobet sponsor west ham, sbobet asia daftar, and don't forget this best bandar sbobet blog alongside all agen sbobet388, best scooter for food delivery uk, best pirate game on mobile, judi bola parlay terpercaya, hukum judi bola di indonesia, daftar sbobet88 mobile, on top of awesome judi bola site and don't forget best seats on emirates 777-200lr, apa yang dimaksud dengan menari, agen bola terbaik dan terpercaya, agen sbobet88, agen sbobet dengan server terbaik dan terpercaya, sbobet, which is also great. finally, have a look at this best bandar sbobet details with sbobet mobile co uk, sbobet football prediction, judi bola online24jam terpercaya 2021, slot or slots, sbobet888, best swing speed app, for good measure. |
|
Nach oben |
|
![](templates/subSilver/images/spacer.gif) |
|
|
Du kannst keine Beitrδge in dieses Forum schreiben. Du kannst auf Beitrδge in diesem Forum nicht antworten. Du kannst deine Beitrδge in diesem Forum nicht bearbeiten. Du kannst deine Beitrδge in diesem Forum nicht lφschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Powered by phpBB © 2001, 2002 phpBB Group Deutsche άbersetzung von phpBB.de
|
|
|