iMacro to generate random text or random numbers for twitter - twitter

I want to tweet randomly so I won't get a message from twitter saying you already tweeted that.
Here is the code that isn't working with random text. How can I add to this so I can enter random text/numbers to tweet?
code:
VERSION BUILD=8961227 RECORDER=FX
TAB T=1
URL GOTO=https://twitter.com/
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#tweet-box-home-timeline" BUTTON=0
WAIT SECONDS=2
EVENTS TYPE=KEYPRESS SELECTOR="#tweet-box-home-timeline" CHARS="#twitter "
WAIT SECONDS=2
EVENT TYPE=CLICK SELECTOR="#timeline>DIV:nth-of-type(2)>DIV>FORM>DIV:nth-of-type(2)>DIV:nth-of-type(2)>BUTTON" BUTTON=0
WAIT SECONDS=4

If you want to get a random text from the set defined by you, try this:
TAB T=1
URL GOTO=https://twitter.com/
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#tweet-box-home-timeline" BUTTON=0
WAIT SECONDS=2
' define and add your texts here
SET texts "['randomText1', 'randomText2', 'randomText3']"
SET rndText EVAL("var texts = eval('{{texts}}'); texts[Math.floor(Math.random()*(texts.length))];")
EVENTS TYPE=KEYPRESS SELECTOR="#tweet-box-home-timeline" CHARS={{rndText}}
WAIT SECONDS=2
EVENT TYPE=CLICK SELECTOR="#timeline>DIV:nth-of-type(2)>DIV>FORM>DIV:nth-of-type(2)>DIV:nth-of-type(2)>BUTTON" BUTTON=0
WAIT SECONDS=4

Related

Google Calendar Link Generator - Repeat event

I'm finding a webtool to generate a Google Calendar link event with a repeat parameters. For example I would like to create an event with this data:
Title: Example event
Location: Office
Description: This is a description of an example event.
Start Date: 01/10/2021
Start Time: 10:00:00h
Repeat at: each months.
I have found URL as like:
https://jennamolby.com/google-calendar-link-generator/
But in this URL I cann't to set a repeat parameter.
An URL example without repeat time event parameter is this:
http://www.google.com/calendar/event?action=TEMPLATE&dates=20211001T100000Z%2FT010000Z&text=Example%20event&location=Office&details=This%20is%20a%20description%20of%20an%20example%20event.%20
I would like to find documentation about all possible parameters to create Google Calendar events.
Thanks.
The parameter to insert a repeat event is:
&recur=RRULE:FREQ%3DMONTHLY&sf=true
In this example the repeat is monthly.

Is there a way to get the last chat massage in shout or say?

I want to search the last message for a few strings and then echo the message back with those strings replaced with other strings.
I searched multiple documentations but didn't find a way to get the last message.
This is the first forum I ask as I already have an account so have no real starting point to give you.
Thanks in advance!
There is no way in the WoW API to get the last chat message of a specific channel. You will have to handle the CHAT_MSG_CHANNEL event (see Event Handling) to read all messages, and store the newest one. Specifically for the say or yell (shout) channels there are the CHAT_MSG_SAY and CHAT_MSG_YELL events respectively.
To do this your addon needs to own a Frame, these frames can register event handlers and you will have to store the last message you receive from that handler in a local variable in your script (let's call it last_message). Then when your other piece of code executes you can read the last_message variable:
local frame = CreateFrame("FRAME", "FooAddonFrame");
local last_message = nil;
frame:RegisterEvent("CHAT_MSG_CHANNEL");
local function eventHandler(self, event, ...)
-- Look up the arguments that are given to your specific event
-- and assign them to variables in order by retrieving them from
-- the `...` variable arguments
local msg, author, language, channel = ...
print("Hello World! Hello " .. event);
last_message = msg
end
frame:SetScript("OnEvent", eventHandler);

bacon.js how to combine stream with another based on first ?

I have a stream daysFromApi$ with data (days with meals) from API. When a 'delete' button is clicked, I push mealId to this.deleteBus$. I want to have a new value in the stream: daysAfterDelete$. My problem is that 'first' event is always triggered, but 'done' never triggers, flatMapLatest does not work, map neither.
const daysAfterDelete$ = this.deleteBus$
.log('first') // triggers when new mealId is pushed to deleteBus(a button is clicked)
.flatMapLatest(mealId => Bacon.combineAsArray(daysFromApi$, mealId))
.log('done'); // never triggers
I want to get following flow:
daysFromApi$ : A B C
deleteBus$ : 1 2 3
daysAfterDelete$: (1,A) (2,B) (3,B)
Not quite sure what you want to achieve, but if you want to get the latest value of "days" when the delete is clicked, you can use sampledBy. https://www.webpackbin.com/bins/-Ki3lTzM8PM4zeJKK9C0

Frank can't touch a textField with tag

I have a UITableViewCell, and it was made up with one UITextLable and one UITextField
This UITextField without placeholder and accessibilityhint
I have to write my feature file touch this UITextFeild by tag.
When /^I touch the (\d*)(?:st|nd|rd|th)? text field$/ do |ordinal|
ordinal = ordinal.to_i
text_field_selector = "textField tag:#{ordinal}"
touch (text_field_selector)
end
With this step definition, frank(cucumber) raised the error message said that could not find anything matching [textFeild tag:2]
And I've changed my code into:
When /^I touch the (\d*)(?:st|nd|rd|th)? text field$/ do |ordinal|
ordinal = ordinal.to_i
text_field_selector = "textField tag:#{ordinal}"
frankly_map (text_field_selector, 'becomeFirstResponder')
end
Now, frank finally not raise any error message and marked as the test step as passed, but I was expecting that when come to this test step, keyboard would come up and stay their waiting for user to input text.
Actual result was the keyboard flashed a bit, and quickly disappeared. Nothing can be inputted.
This is weird and I'm not sure what's this about.
I don't know frank but you can catch a parameter in console in Cucumber by using ask method. Something looks like this:
When /^I touch the text field$/ do
ordinal = ask("Which field number?").to_i
text_field_selector = "textField tag:#{ordinal}"
touch (text_field_selector)
end

Triggering OK from the call back on GetParm

I am using the IUP.GetParm dialog to do a search and replace prompt.
The dialog supports 3 buttons, the first two OK and Cancel close the prompt and return to the main program flow.
The third button can be tracked in the parm_action function, what I want to do is use the third button to skip the item and close the dialog, but I can't work out if this is possible.
I have asked this on the IUP mailing list but have not yet had a response.
function param_action(dialog,index)
if index == -4 then
bSkip = true
return 1
end
end
bSkip = false
bConfirm,strFromString,strToString,bSkip =
iup.GetParam("Search and Replace",
param_action,
fhGetTag(ptrRecord)..'-'..fhGetTag(ptr)..
' '..fhGetDisplayText(ptrRecord).." %t\n"..
"Replace: "..strBoxType.."\n"..
"With: "..strBoxType.."\n"..
"btn: %u[Ok,Cancel,Skip] \n"
, strFromString,strToString)
if bConfirm and not(bSkip) then
-- replace string
end
To make this function currently you have to press the Skip button and then the Ok button.
Just re-posting the answer from the IUP mailing list here:
Inside the call-back, when the 3rd button is pressed, set the dialog
attribute "status" to "1" and call the function iup.ExitLoop().

Resources