我喜欢在AutoIT中创建一个脚本以在Excel中工作。当我试图用以下参数创建一个变量时给我错误。
$ myformula =“= IF(或(ISNUMBER(搜索(”“& {”quality“,”st“,”rainbow“,”carryout“,”auto“,”surgery“,”public“,”肥料”, “肥料”, “ifertilisersl”, “会合”, “记得”, “认为”, “预制”, “赤脚”, “邮件”, “脚手架”, “安全”, “访问”, “救赎” “军队”, “葬礼”, “董事”, “导演”, “海马”, “简单”, “物美价廉”, “施蒂希”, “时间”, “裁缝”, “改变”, “医院”,”通过”,‘珠宝商’,‘后’,‘甜蜜蜜’,‘轰动’,‘战利品’,‘雕刻’,‘保护’,‘生产’,‘公’,‘关系’,‘制造’,‘好玩’ , “拍卖”, “拍卖”, “kiltmakers”, “kiltmaker”, “麻”, “花栗鼠”, “木”, “整洁”, “缠结”, “过去”, “经销商”, “交易”,”工艺品”,‘工艺’,‘海军’,‘活动’,‘美国’,‘叔叔’,‘晚餐’,‘清除量’,‘志愿者’,‘动物园’,‘波长’,‘波长’,‘朋友’ “美容”, “theatreclub”, “daynursery”, “MUSLC”, “超市”, “学校”, “AALCO”, “土豚”, “ABACUS”, “ABB”, “ABBOTSWELL”, “ABBOTTPUBLIC”,” ABC “ ”ABCON“, ”ABDN“, ”ABERCARE“, ”ABERDEE“, ”香港仔“, ”阿伯丁“, ”ABERFLORA“, ”ABERGELDIE“, ”ABERGLEN“, ”亚伯劳尔“,” A BERMED”, “ABERNE”, “ABERPEST”, “ABERSOL”, “ABERT”, “ABSCOT”, “Absoft公司”, “ABSPEK”, “ABSURE”, “ABTEX”, “ABTRUST”, “学院”, “ACCESS” , “附件”, “住宿”, “协议”, “会计学”, “ACCURAY”, “ACE”, “动作”, “适应”, “ADEPT”, “ADMIN”, “ADMIRAL”, “ADS”,”成人”, “前进”, “高级”, “ADVANT”, “优势”, “建议”, “AEA”, “婚外情”, “AFOS”, “AGA”, “年龄”, “代理”, “AGIP” “AGRI”, “农业”, “农业”, “AHT”, “AI”, “艾滋病”, “AIR”, “空降兵”, “AIRFAIR”, “航空”, “AIRNAUTIC”, “AIRPAC”,” AIRPORT”, “航空公司”, “AIRYHALL”, “AIRYLEA”, “阿克伦”, “ALAD”, “ALASDAIR”, “ALB”, “ALBATECH”, “阿尔法”, “ALL”, “联盟”, “联姻” “ALLOMAX”, “ALPINE”, “ALSTEV”, “替代物”, “ALTRA”, “始终”, “阿尔茨海默”, “AM”, “AMALGAMATED”, “AMAT”, “AMATOLA”, “黄色”,” AMEC”, “AMERICAN”, “阿美”, “阿明”, “艾米”, “AMOCO”, “AMTECH”, “美铁”, “游”, “和”, “ANDERGAUGE”, “ANIXTER”, “安卡” “古董”, “ANTRIM”, “AOC”, “AP”, “APARDION”, “APEX”, “阿波罗”, “使徒”, “上诉”, “应用”, “阿波罗”, “AQUA”,”水族 “ ”AQUATEC“, ”水生“, ”AQUIDATA“, ”建筑“, ”ARCO“, ”淘金者“,” 康特”, “ARISTACUT”, “ARJO”, “ARJON”, “ARKAIG”, “ARTISTES”, “艺术家”, “ARTWORKS”, “ARUP”, “AS”, “ASA”, “ASCOT”, “ASDASUPERSTORES” “ASHVALE”, “方面”, “部件”, “评估者”, “关联”, “ASSOCIATES”, “关联”, “保证”, “紫菀”, “ASTRA”, “ATEL”, “ATHENA”,“ATHENAEUM ”, “亚瑟尔”, “大西洋”, “奥赫米尔”, “AUCHTERLESS”, “AUGHTON”, “八五”, “AUP”, “AUQUHARNEY”, “极光”, “AUTO”, “AUTOFIX”, “汽车玻璃”, “AUTOMAGIC”, “AUTOQUICK”, “AUTOSAVE”, “AUTOSPRAY”, “运货卡车”, “AVCO”, “AVENUE”, “觉醒”, “离开”, “AXIOM”, “AZTEC”, “巴德尔”,“BALNAGASK ”, “班克黑德”, “BAR”, “BARICO”, “BARRIER”, “易货”, “基线”, “BATCHBRIGHT”, “浴”, “卫生间”, “巴伐利亚”, “拜里斯”, “BAYLOR”, “轴承”, “BEATTIES”, “美”, “BEAVERBROOKS”, “BEECHWOOD”, “守卫”, “直线”, “亲近”, “本博”, “百威”, “BEWS”, “BIKES”,“BLIND ”, “BLINDCRAFT”, “百叶窗”, “血液”, “起霜”, “BLOSSOMS”, “吹”, “风信子”, “BMT”, “BNA”, “板”, “BOARS”, “船”, “BODY”, “BOHEMIA”, “锅炉工”, “BON”, “BONADDIO”, “BONAVENTURE”, “BONIVIEW”, “BONNYMUIR”, “装订”, “引导”, “博罗”, “的Borsalino”,“BOSA NQUET”, “BOSCH”, “桶装”, “大道”, “BOURTREE”, “博文”, “保龄球”, “BOWTECH”, “BOX”, “BP”, “BPCC”, “BRA”, “布莱肯瑞吉” “布雷黑德”, “布雷赛德”, “制动”, “附图”, “BRITANNIA”, “BRITANNIC”, “远大”, “广播”, “BROADSTRAIK”, “BROS”, “兄弟会”, “BRUNSWICK”,”巴克斯本”, “预算”, “楼”, “BULAWEYO”, “局”, “BURNTHILLS”, “BUS”, “商界”, “投棒”, “小屋”, “电缆”, “CABS”, “CAFE” “凯尔德”, “CAIRNCRY”, “凯恩戈姆”, “蛋糕”, “CALEDON”, “喀”, “CALEDONIAN”, “CALLANDERS”, “CALOR”, “CALTEC”, “CALVARYTABERNACLEUNITED”, “CAMARGUE”,” CAMEO”, “战役”, “坎贝尔”, “CAMPHILL”, “CAMWATER”, “CAN”, “CANALE”, “癌症”, “CANDO”, “CANSCO”, “海角七号”, “CARADON”, “一卡通” ,“CAREERS”,“CARGO”,“CARPET”,“CARPETS”}&“”,“”& b1&“”))),“YES”,“NO”)“
我也试过双引号。我该怎么办?
答案 0 :(得分:2)
字符串用双引号括起来,比如“this”。如果您希望字符串实际包含双引号,请使用两次,如:
"here is a ""double-quote"" - ok?"
你也可以使用像'this'这样的单引号和'这里是''单引号'' - 好吗?'
您可以混合报价类型,以便更轻松地工作,并避免必须加倍报价以获得您想要的。例如,如果要在字符串中使用大量双引号,则应使用单引号来声明它们:
'This "sentence" contains "lots" of "double-quotes" does it not?'
比以下简单得多:
"This ""sentence"" contains ""lots"" of ""double-quotes"" does it not?"
只需使用'而不是'。 像这样:
$myformula = '=IF(OR(ISNUMBER(search(" "&{"quality","st","rainbow","carryout","auto","surgery","public","fertiliser","Fertilisers","ifertilisersl","rendezvous","remember","that","precast","barefoot","mail","scaffolding","safe","access","salvation","army","funeral","directors","director","seahorse","simply","affordable","stich","time","dressmaking","alterations","hospital","by","jewellers","post","sweet","sensation","trophies","engraving","protection","produce","public","relations","made","fun","auctions","auction","kiltmakers","kiltmaker","linen","chippy","timber","tidy","tangles","past","dealer","trading","crafts","craft","naval","activities","US","Uncle","Diner","Removals","Volunteer","Zoo","Wavelength","Wavelengths","Friends","hairdressing","theatreclub","daynursery","MUSLC","superstore","colleges","AALCO","AARDVARK","ABACUS","ABB","ABBOTSWELL","ABBOTTPUBLIC","ABC","ABCON","ABDN","ABERCARE","ABERDEE","ABERDEEN","ABERDEENSHIRE","ABERFLORA","ABERGELDIE","ABERGLEN","ABERLOUR","ABERMED","ABERNE","ABERPEST","ABERSOL","ABERT","ABSCOT","ABSOFT","ABSPEK","ABSURE","ABTEX","ABTRUST","ACADEMY","ACCESS","ACCESSORIES","ACCOMMODATION","ACCORD","ACCOUNTANCY","ACCURAY","ACE","ACTION","ADAPT","ADEPT","ADMIN","ADMIRAL","ADS","ADULT","ADVANCE","ADVANCED","ADVANT","ADVANTAGE","ADVICE","AEA","AFFAIR","AFOS","AGA","AGE","AGENCY","AGIP","AGRI","AGRICULTURAL","AGRICULTURE","AHT","AI","AIDS","AIR","AIRBORNE","AIRFAIR","AIRLINES","AIRNAUTIC","AIRPAC","AIRPORT","AIRWAYS","AIRYHALL","AIRYLEA","AKRON","ALAD","ALASDAIR","ALB","ALBATECH","ALFA","ALL","ALLIANCE","ALLIED","ALLOMAX","ALPINE","ALSTEV","ALTERNATIVES","ALTRA","ALWAYS","ALZHEIMER","AM","AMALGAMATED","AMAT","AMATOLA","AMBER","AMEC","AMERICAN","AMETEK","AMIN","AMITEC","AMOCO","AMTECH","AMTRAK","AMUSEMENT","AND","ANDERGAUGE","ANIXTER","ANKA","ANTIQUES","ANTRIM","AOC","AP","APARDION","APEX","APOLLO","APOSTOLIC","APPEALS","APPLIED","APPOLLO","AQUA","AQUARISTS","AQUATEC","AQUATIC","AQUIDATA","ARCHITECTURAL","ARCO","ARGONAUT","ARGOSY","ARISTACUT","ARJO","ARJON","ARKAIG","ARTISTES","ARTISTS","ARTWORKS","ARUP","AS","ASA","ASCOT","ASDASUPERSTORES","ASHVALE","ASPECT","ASSEMBLIES","ASSESSORS","ASSOCIATED","ASSOCIATES","ASSOCIATION","ASSURANCE","ASTER","ASTRA","ATEL","ATHENA","ATHENAEUM","ATHOLL","ATLANTIC","AUCHMILL","AUCHTERLESS","AUGHTON","AUGUST","AUP","AUQUHARNEY","AURORA","AUTO","AUTOFIX","AUTOGLASS","AUTOMAGIC","AUTOQUICK","AUTOSAVE","AUTOSPRAY","AUTOTRUCK","AVCO","AVENUE","AWAKENING","AWAY","AXIOM","AZTEC","BAADER","BALNAGASK","BANKHEAD","BAR","BARICO","BARRIER","BARTERING","BASELINE","BATCHBRIGHT","BATH","BATHROOM","BAVARIA","BAYLISS","BAYLOR","BEARING","BEATTIES","BEAUTY","BEAVERBROOKS","BEECHWOOD","BEEFEATER","BEELINE","BEFRIEND","BENBOW","BESTWAY","BEWS","BIKES","BLIND","BLINDCRAFT","BLINDS","BLOOD","BLOOMING","BLOSSOMS","BLOW","BLUEBELLS","BMT","BNA","BOARD","BOARS","BOAT","BODY","BOHEMIA","BOILERMAKERS","BON","BONADDIO","BONAVENTURE","BONIVIEW","BONNYMUIR","BOOKBINDING","BOOTS","BOROWSKI","BORSALINO","BOSANQUET","BOSCH","BOTTLED","BOULEVARD","BOURTREE","BOWEN","BOWLING","BOWTECH","BOX","BP","BPCC","BRA","BRACKENRIDGE","BRAEHEAD","BRAESIDE","BRAKE","BRIEF","BRITANNIA","BRITANNIC","BROAD","BROADCAST","BROADSTRAIK","BROS","BROTHERHOOD","BRUNSWICK","BUCKSBURN","BUDGET","BUILDING","BULAWEYO","BUREAU","BURNTHILLS","BUS","BUSINESS","CABER","CABINS","CABLE","CABS","CAFE","CAIRD","CAIRNCRY","CAIRNGORM","CAKE","CALEDON","CALEDONIA","CALEDONIAN","CALLANDERS","CALOR","CALTEC","CALVARYTABERNACLEUNITED","CAMARGUE","CAMEO","CAMPAIGN","CAMPBELLS","CAMPHILL","CAMWATER","CAN","CANALE","CANCER","CANDO","CANSCO","CAPE","CARADON","CARD","CAREERS","CARGO","CARPET","CARPETS"}&" "," "&b1&" "))),"YES","NO")'
答案 1 :(得分:1)
你有一个 很多 的引号。尝试重写它一次只添加一个字符串...一旦你开始工作,你就可以开始一次添加多个字符串。