Here is the script that I ended up using:
;Disable the Right Alt key (the keydown event will still be fired, but that's OK)
RAlt::Return
RAlt & a::
if GetKeyState("Shift", "P") {
Send Ă
} else {
Send ă
}
Return
RAlt & q::
if GetKeyState("Shift", "P") {
Send Â
} else {
Send â
}
Return
RAlt & i::
if GetKeyState("Shift", "P") {
Send Î
} else {
Send î
}
Return
RAlt & s::
if GetKeyState("Shift", "P") {
Send Ș
} else {
Send ș
}
Return
RAlt & t::
if GetKeyState("Shift", "P") {
Send Ț
} else {
Send ț
}
Return
RAlt & e::Send €
RAlt & c::Send ©
Please note that I have only mapped the keys that I needed from the Romanian Programmers layout, which has a few more shortcuts for uncommon symbols.