Code: Select all
Class phpBB
{
Login(url, user, pwd) {
static ForumUrl := "url"
; Login ...
}
NewTopic(Title, Content) {
MsgBox, % This.Login().ForumUrl "/posting.php?mode=post&f=5"
; Post new topic ...
}
}
phpBB.Login("http://ahkscript.org/boards", "u", "*")
phpBB.NewTopic("title", "content")
Return
==========================================================
Currently I'm using something like global url in every methods, e.g.:
Code: Select all
Class test
{
m1() {
global url
}
m2() {
global url
}
; ...
}
And I can't code like this, because the url is dynamic.
Code: Select all
Class test
{
static url := url
}