No. you misunderstood, you copy the cast animation file that already exists in the game into an IDLE animation in the CS (call it MyCastAnimation or some such name).
Use a condition on the idle that is a variable (myVar) in your script.
Then you use this in your script:
if MyVar == 1
Player.pickidle 1
set MyVar to 2
elseIf player.AnimPathIncludes "MyCastAnimation" == 1 && MyVar == 2
set myVar to 0
endif
Thus as your post first requested, anytime you set your script MyVar to 1
the player will
run the cast animation with no issues like with player.cast spell.
Create an idle animation using the cast animation KF file.