This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Устанавливаем название и копируем в буффер обмена | |
set nameProfile to "Auto_" | |
set numberProfile to (current date) as text | |
set the clipboard to nameProfile & numberProfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Выбираем файл | |
-- И копирует содержимое файла | |
set fileCards to "~/applescript/acc.txt" | |
set theText to read fileCards | |
set theTextList to paragraphs of theText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Эмулятор клавиатуры на AppleScript: CMD+T | |
-- В данном примере запускает Хром и открываем новую вкладку | |
tell application "Google Chrome" to activate | |
tell application "System Events" to key code 17 using command down | |
delay 0.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Safari" | |
tell window 1 | |
set current tab to make new tab with properties {URL:"https://facebook.com/adsmanager"} | |
delay 5 | |
end tell | |
do JavaScript "var re = new RegExp('access_token\"?:\"(.*?)\"'); | |
var m = document.documentElement.innerHTML.match(re); | |
function copyToClipboard(text){ | |
var copytext=document.createElement('input') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Достаём токен из AdsManager FB, в INIDGO | |
set myLink to "https://facebook.com/adsmanager" | |
tell application "Chromium" | |
activate | |
open location myLink | |
delay 5 | |
execute active tab of window 1 javascript "var re = new RegExp('access_token\"?:\"(.*?)\"'); | |
var m = document.documentElement.innerHTML.match(re); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Determine the input file's path. | |
set srcFile to ((path to desktop) as text) & "myFile.txt" | |
# Read lines from file. | |
set lns to paragraphs of (read file srcFile as «class utf8») | |
# Loop over lines read and copy each to the clipboard. | |
repeat with ln in lns | |
set the clipboard to ln | |
display alert (the clipboard) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Добавляем токен в ФБтул | |
set token to (the clipboard) | |
do shell script "curl --location --request POST 'https://fbtool.pro/api/add-account?key=API_KEI_FBTOOL' --form 'token=" & token & "' --form 'name=Auto' --form 'group=ID_GOUP'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Достаём токен из AdsManager FB, в INIDGO | |
set myLink to "https://facebook.com/adsmanager" | |
tell application "Chromium" | |
activate | |
open location myLink | |
delay 5 | |
execute active tab of window 1 javascript "var re = new RegExp('access_token\"?:\"(.*?)\"'); | |
var m = document.documentElement.innerHTML.match(re); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Отключаем уведомления в аккаунте | |
set myLink to "https://facebook.com/adsmanager" | |
tell application "Chromium" | |
activate | |
delay 2 | |
execute active tab of window 1 javascript "var rsa = new RegExp('selected_account_id\"?:\"(.*?)\"'); | |
var msa = document.documentElement.innerHTML.match(rsa); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved. | |
* | |
* You are hereby granted a non-exclusive, worldwide, royalty-free license to | |
* use, copy, modify, and distribute this software in source code or binary | |
* form for use in connection with the web services and APIs provided by | |
* Facebook. | |
* | |
* As with any software that integrates with the Facebook platform, your use |
OlderNewer