- 浏览: 1004597 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (675)
- ios (214)
- android-course (5)
- unity3d (7)
- cocos2d (36)
- html5 (3)
- game (5)
- android (42)
- java (57)
- php (12)
- 创业 (10)
- SEO (3)
- 架构 (2)
- 数据库 (3)
- 产品设计 (9)
- 操作系统 (10)
- Web前端 (11)
- 其他 (50)
- GAE (1)
- mac os (8)
- Open Source (2)
- 序列号 (10)
- C (2)
- database (2)
- 算法 (6)
- 设计模式 (1)
- photoshop (1)
- 3dmax (1)
- maya (1)
- opengl (3)
- 游戏设计 (1)
- 趋势 (1)
- cocos2d-x (4)
- shell (3)
- c++ (30)
- lua (5)
- flash (1)
- spring (3)
- mysql (4)
- Git (6)
- xmpp (1)
- cocos2dx (14)
- mac (2)
- 编程规范 (2)
- windows (1)
- linux (5)
- coocs2dx (1)
- ubuntu (2)
- aws (1)
- OPENGLES (1)
- 原画 (1)
最新评论
-
jlees:
Best mobile app testing tool pc ...
iOS + XCode 4 + GHUnit = Mobile TDD+Continuous testing -
ipanda:
楼主,能否给一个Micro CloudFoundry的虚机或者 ...
Cloud Foundry使用及开发向导 -
love_zongming:
谢谢分享。。
visio2007序列号 -
雨花台舞水:
你这才是枪文把
套在 360 黑匣子外面的黑盒子:你被技术型枪稿吓到了么? -
hugh.wang:
改天试试
Mac版魔兽争霸3 1.24e下载
用惯了Windows的右键新建文本文件, 在Finder里面没有这个功能,感觉很不方便.
于是就自己动手, 在Automator里用AppleScript现查现学现用作了一个.
这是我写的第一个Apple Script. 写下来感觉Apple Script还是满方便的, 基本跟英文差不多.
唯一不方便的是里面居然没有内建正则表达式.
要在Finder里面添加这个功能, 具体步骤如下:
1 打开Automator, 选择自定, 然后将 操作->实用工具->运行 AppleScript 拖到右边工作区.
2 在右边的AppleScript的内容删掉, 用附件中的代码代替
3 另存为Automator的插件, 名称为"新建文本文件", OK, 搞定
4
现在进入Finder的一个目录,然后 右键->更多->Automator->新建文本文件. 就会在当前目录新建一个文本文件, 并用TextEdit打开让你编辑.
本文轉自macfans
(* --Author: Libok Zhou (libk.8800.org, libkhorse@gmail.com). Feel free to contact me if you have questions about this script --Usage: This script is used for Automator to add an "new text file" to the context menu, when you want to create a new text file in current folder of Finder *) tell application "Finder" try set currentFolder to (folder of the front window) set currentPath to (POSIX path of (target of the front window as alias)) set libkIsDeskTop to false on error set currentFolder to desktop set currentPath to (POSIX path of (desktop as alias)) set libkIsDeskTop to true end try (* set currentPath to (POSIX path of (target of the front window as alias)) set currentFolder to (folder of the front window) *) set txtName to text returned of (display dialog "Please enter the text name, " default answer "untitled.txt") --if txtName is empty using "untitled.txt" as default --no trailing extension, suffix with ".txt" --have extension, don't touch it. if length of txtName = 0 then set ext to "txt" set baseName to "untitled" set txtName to "untitled.txt" else set prevTID to text item delimiters of AppleScript set text item delimiters of AppleScript to "." set libkNameParts to text items of txtName set text item delimiters of AppleScript to prevTID set len to length of libkNameParts if len = 1 then set ext to "txt" set baseName to txtName set txtName to baseName & "." & ext else if len = 2 then set ext to last text item of libkNameParts set baseName to item 1 of libkNameParts as text else set ext to last text item of libkNameParts set baseName to text 1 thru -((length of ext) + 1) of txtName end if end if -- if the file name already exists in current folder, attach the "_n" to the filename set n to 1 considering case tell (get name of currentFolder's files) to repeat while txtName is in it set txtName to baseName & "_" & n & "." & ext set n to n + 1 end repeat end considering set newTxt to currentPath & txtName do shell script "touch " & newTxt if libkIsDeskTop is false then select the file txtName in currentFolder tell application "TextEdit" activate open newTxt end tell end tell
发表评论
-
Mac上安装Protocol Buffers
2016-09-18 11:29 7711.下载文件 (http://code.google.com ... -
webview点击获取图片
2016-04-01 17:12 781UILongPressGestureRecognizer * ... -
hexo 自动部署脚步
2016-03-29 21:17 886echo "===============star ... -
自定义navigationItem.leftBarButtonItem后,系统默认的手势滑动失效解决方案
2016-03-01 18:01 1242自定义navigationItem.le ... -
UITextView autolayout 高度自适应
2016-02-15 23:26 1357UITextView *t = [[UITextView ... -
腾讯敏捷框架TAPD》研究
2015-11-19 20:47 1382这篇文档是研究心得 ... -
ios image 压缩
2015-11-06 12:09 793- (UIImage *)_scaleToSize:(UII ... -
iphone分辨率图解
2015-11-04 17:33 493iphone分辨率图解 -
IOS中获取各种文件的目录路径的方法
2015-09-24 12:10 611iphone沙箱模型的有四个文件夹,分别是什么,永久数据存储 ... -
Customizing Navigation Bar and Status Bar in iOS 7
2015-08-17 20:23 1554Like many of you, I have been ... -
GCD 深入理解:第一部分
2015-07-24 14:49 720本文翻译自 http://www.raywenderlich ... -
Mac上的抓包工具Charles
2015-05-06 01:09 5277Mac上的抓包工具Charles 分类: IO ... -
如何移除发布版本中的NSLog输出
2015-05-04 20:27 697Phone开发中会经常使用NSLog将一些运行信息输出到终端 ... -
xcode4的环境变量,Build Settings参数,workspace及联编设置
2015-03-27 11:23 876一、xcode4中的环境变量 $(BUILT_PROD ... -
数字签名是什么?
2014-11-25 16:58 581http://www.ruanyifeng.com/blog/ ... -
让你的Xcode更加高效
2014-10-29 00:16 469http://www.tairan.com/archives/ ... -
我所经历的“余额宝”的那些故事
2014-06-08 01:05 709“余额宝”经过不到 ... -
代码手写UI,xib和StoryBoard间的博弈,以及Interface Builder的一些小技巧
2014-05-31 01:25 751最近接触了几个刚入门的iOS学习者,他们之中存在一个普遍 ... -
WWDC 2013 Session笔记 - iOS7中的多任务
2014-05-31 01:24 616这是我的WWDC2013系列笔记中的一篇,完整的笔记列表 ... -
APP被苹果App Store拒绝的79个原因(未完待续)
2014-05-09 10:49 1112作为iOS开发者,估计有很多都遇到过APP提交到App Sto ...
相关推荐
Automator的批量自定义文件改名.docx
解决uiautomatorviewer报错问题,分享给大家。 Unexpected error while obtaining UI hierarchy # 点击Details java.lang.reflect.InvocationTargetException
替换jar包后使得uiautomatorviewer.bat定位多出一个xpath方式
该压缩包内文件为app测试元素定位工具(可进行xpath定位),解压后将文件拷贝到sdk安装目录下的此目录lib下,例如:D:\AndroidADT\sdk\tools\lib,替换原有的uiautomatorviewer.jar包即可
1、把下载好的jar包uiautomatorviewer.jar拷贝到安卓安装目录 \Android-sdk\tools\lib 文件夹中替换掉原来的ui...2、双击安卓安装目录下的 \android-sdk\tools\uiautomatorviewer.bat 文件,启动lazy-uiautomatorviewer
tools/lib中ddmlib、ddms、ddmuilib 、uiautomatorviewer这四个jar包 解压后,把里面的四个jar包文件单独复制到 tools/lib文件夹进行替换即可...注意:文件名字也要和之前的一样,不然启动uiautomatorviewer.bat会闪退
sdk文件,通过更新SDK-tools/lib路径里的uiautomatorviewer.jar文件,适配Android 8.0以上版本来获取被测app元素控件读取,方便自动化元素定位。
uiautomatorviewer,解压后双击uiautomatorviewer_new1.bat即可打开
带有xpath的lazyuiautomatorviewer,下载直接替换原先的uiautomatorviewer
tools/lib中ddmlib、ddms、ddmuilib 、uiautomatorviewer这四个jar包 解压后,把里面的四个jar包文件单独复制到 tools/lib文件夹进行替换即可。 这样就可以支持安卓 8.0以上的 元素定位了。非常好用!
uiautomatorviewer获取xpath工具 uiautomatorviewer获取xpath工具 uiautomatorviewer获取xpath工具 uiautomatorviewer获取xpath工具 uiautomatorviewer获取xpath工具
mac上的automator工具简单的教程,为转载,其他地方也可以搜索到该资源
Arduino-Automator.zip,Digispark™Rubber Ducky代码编辑器Windows版。Digispark™Rubber Ducky代码编辑器Windows版。,Arduino是一家开源软硬件公司和制造商社区。Arduino始于21世纪初,深受电子制造商的欢迎,...
uiautomatorviewer 源代码,从Android官方找到的
UiAutomatorviewer 源码对应 Android 8.0。 UiAutomatorviewer 的源码,对应 Android 8.0 版本 。 uiautomator
扫描和分析Android应用程序的UI控件的工具。使用uiautomatorviewer可以抓取到的用来定位控件的元素,支持xpath获取。除此之外,appium还支持按Xpath来定位控件
支持xpath定位,将uiautomatorviewer.jar包放至android-sdk-windows\tools\lib目录下,运行android-sdk-windows\tools\uiautomatorviewer.bat就可以了
UiautomatorViewer最新源码,支持android 9.0及以下版本
uiautomatorviewer支持android8 jar包,将jar包替换掉android sdk的tools/lib中的文件后重启uiautomatorviewer即可定位android8以上设备页面元素