I have 100 ether in my smart contract now I want to transfer the ether from contract to account automatically
3 Answers
For you to be able to withdraw/transfer any ether from your smart contract, the functionality to do so, must be included as part of the smart contract i.e. some kind of withdraw function, selfdestruct etc. If the functionality is not defined within the smart contract, then the ether will be stuck in the smart contract.
use transfer() function. more detail
other Address = 0xsdlapd // ... target balance
otherAddress.transfer(100 * 10 **18) // 100 * 10 ** 18 = 100 ETH
Put msg.sender.transfer(yourAmount) inside some function, make sure it's written right and then call it from your account.